Lines Matching refs:bh

62 	struct buffer_head *bh;  in nilfs_gccache_submit_read_data()  local
65 bh = nilfs_grab_buffer(inode, inode->i_mapping, blkoff, 0); in nilfs_gccache_submit_read_data()
66 if (unlikely(!bh)) in nilfs_gccache_submit_read_data()
69 if (buffer_uptodate(bh)) in nilfs_gccache_submit_read_data()
77 brelse(bh); in nilfs_gccache_submit_read_data()
82 lock_buffer(bh); in nilfs_gccache_submit_read_data()
83 if (buffer_uptodate(bh)) { in nilfs_gccache_submit_read_data()
84 unlock_buffer(bh); in nilfs_gccache_submit_read_data()
88 if (!buffer_mapped(bh)) { in nilfs_gccache_submit_read_data()
89 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_gccache_submit_read_data()
90 set_buffer_mapped(bh); in nilfs_gccache_submit_read_data()
92 bh->b_blocknr = pbn; in nilfs_gccache_submit_read_data()
93 bh->b_end_io = end_buffer_read_sync; in nilfs_gccache_submit_read_data()
94 get_bh(bh); in nilfs_gccache_submit_read_data()
95 submit_bh(REQ_OP_READ, 0, bh); in nilfs_gccache_submit_read_data()
97 bh->b_blocknr = vbn; in nilfs_gccache_submit_read_data()
100 *out_bh = bh; in nilfs_gccache_submit_read_data()
103 unlock_page(bh->b_page); in nilfs_gccache_submit_read_data()
104 put_page(bh->b_page); in nilfs_gccache_submit_read_data()
139 int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh) in nilfs_gccache_wait_and_mark_dirty() argument
141 wait_on_buffer(bh); in nilfs_gccache_wait_and_mark_dirty()
142 if (!buffer_uptodate(bh)) { in nilfs_gccache_wait_and_mark_dirty()
143 struct inode *inode = bh->b_page->mapping->host; in nilfs_gccache_wait_and_mark_dirty()
147 buffer_nilfs_node(bh) ? "node" : "data", in nilfs_gccache_wait_and_mark_dirty()
148 inode->i_ino, (unsigned long long)bh->b_blocknr); in nilfs_gccache_wait_and_mark_dirty()
151 if (buffer_dirty(bh)) in nilfs_gccache_wait_and_mark_dirty()
154 if (buffer_nilfs_node(bh) && nilfs_btree_broken_node_block(bh)) { in nilfs_gccache_wait_and_mark_dirty()
155 clear_buffer_uptodate(bh); in nilfs_gccache_wait_and_mark_dirty()
158 mark_buffer_dirty(bh); in nilfs_gccache_wait_and_mark_dirty()