14 #include <linux/string.h>
17 static inline void gfs2_buffer_clear(
struct buffer_head *bh)
19 memset(bh->b_data, 0, bh->b_size);
22 static inline void gfs2_buffer_clear_tail(
struct buffer_head *bh,
int head)
25 memset(bh->b_data + head, 0, bh->b_size - head);
28 static inline void gfs2_buffer_copy_tail(
struct buffer_head *to_bh,
30 struct buffer_head *from_bh,
33 BUG_ON(from_head < to_head);
34 memcpy(to_bh->b_data + to_head, from_bh->b_data + from_head,
35 from_bh->b_size - from_head);
36 memset(to_bh->b_data + to_bh->b_size + to_head - from_head,
37 0, from_head - to_head);
46 return (((
struct gfs2_glock *)mapping) - 1)->gl_sbd;
48 return inode->
i_sb->s_fs_info;
55 int flags,
struct buffer_head **bhp);
68 struct buffer_head **bhp);
70 static inline int gfs2_meta_inode_buffer(
struct gfs2_inode *
ip,
71 struct buffer_head **bhp)
78 #define buffer_busy(bh) \
79 ((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned)))