Lines Matching refs:bh
34 struct buffer_head *bh; in __nilfs_get_page_block() local
40 bh = nilfs_page_get_nth_block(page, block - first_block); in __nilfs_get_page_block()
42 wait_on_buffer(bh); in __nilfs_get_page_block()
43 return bh; in __nilfs_get_page_block()
54 struct buffer_head *bh; in nilfs_grab_buffer() local
60 bh = __nilfs_get_page_block(page, blkoff, index, blkbits, b_state); in nilfs_grab_buffer()
61 if (unlikely(!bh)) { in nilfs_grab_buffer()
66 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_grab_buffer()
67 return bh; in nilfs_grab_buffer()
74 void nilfs_forget_buffer(struct buffer_head *bh) in nilfs_forget_buffer() argument
76 struct page *page = bh->b_page; in nilfs_forget_buffer()
83 lock_buffer(bh); in nilfs_forget_buffer()
84 set_mask_bits(&bh->b_state, clear_bits, 0); in nilfs_forget_buffer()
88 bh->b_blocknr = -1; in nilfs_forget_buffer()
91 unlock_buffer(bh); in nilfs_forget_buffer()
92 brelse(bh); in nilfs_forget_buffer()
105 struct buffer_head *bh; in nilfs_copy_buffer() local
117 bh = dbh; in nilfs_copy_buffer()
119 while ((bh = bh->b_this_page) != dbh) { in nilfs_copy_buffer()
120 lock_buffer(bh); in nilfs_copy_buffer()
121 bits &= bh->b_state; in nilfs_copy_buffer()
122 unlock_buffer(bh); in nilfs_copy_buffer()
143 struct buffer_head *bh, *head; in nilfs_page_buffers_clean() local
145 bh = head = page_buffers(page); in nilfs_page_buffers_clean()
147 if (buffer_dirty(bh)) in nilfs_page_buffers_clean()
149 bh = bh->b_this_page; in nilfs_page_buffers_clean()
150 } while (bh != head); in nilfs_page_buffers_clean()
173 struct buffer_head *bh, *head; in nilfs_page_bug() local
176 bh = head = page_buffers(page); in nilfs_page_bug()
180 i++, bh, atomic_read(&bh->b_count), in nilfs_page_bug()
181 (unsigned long long)bh->b_blocknr, bh->b_state); in nilfs_page_bug()
182 bh = bh->b_this_page; in nilfs_page_bug()
183 } while (bh != head); in nilfs_page_bug()
411 struct buffer_head *bh, *head; in nilfs_clear_dirty_page() local
418 bh = head = page_buffers(page); in nilfs_clear_dirty_page()
420 lock_buffer(bh); in nilfs_clear_dirty_page()
424 (u64)bh->b_blocknr, bh->b_size); in nilfs_clear_dirty_page()
426 set_mask_bits(&bh->b_state, clear_bits, 0); in nilfs_clear_dirty_page()
427 unlock_buffer(bh); in nilfs_clear_dirty_page()
428 } while (bh = bh->b_this_page, bh != head); in nilfs_clear_dirty_page()
438 struct buffer_head *bh, *head; in nilfs_page_count_clean_buffers() local
441 for (bh = head = page_buffers(page), block_start = 0; in nilfs_page_count_clean_buffers()
442 bh != head || !block_start; in nilfs_page_count_clean_buffers()
443 block_start = block_end, bh = bh->b_this_page) { in nilfs_page_count_clean_buffers()
444 block_end = block_start + bh->b_size; in nilfs_page_count_clean_buffers()
445 if (block_end > from && block_start < to && !buffer_dirty(bh)) in nilfs_page_count_clean_buffers()
520 struct buffer_head *bh, *head; in nilfs_find_uncommitted_extent() local
524 bh = head = folio_buffers(folio); in nilfs_find_uncommitted_extent()
528 if (buffer_delay(bh)) { in nilfs_find_uncommitted_extent()
535 } while (++b, bh = bh->b_this_page, bh != head); in nilfs_find_uncommitted_extent()