Lines Matching refs:bh
347 BUG_ON(NILFS_SEGBUF_BH_IS_LAST(ssp->bh, in nilfs_segctor_map_segsum_entry()
349 ssp->bh = NILFS_SEGBUF_NEXT_BH(ssp->bh); in nilfs_segctor_map_segsum_entry()
351 p = ssp->bh->b_data + ssp->offset; in nilfs_segctor_map_segsum_entry()
376 sci->sc_finfo_ptr.bh = sumbh; sci->sc_finfo_ptr.offset = sumbytes; in nilfs_segctor_reset_segment_buffer()
377 sci->sc_binfo_ptr.bh = sumbh; sci->sc_binfo_ptr.offset = sumbytes; in nilfs_segctor_reset_segment_buffer()
473 struct buffer_head *bh, in nilfs_segctor_add_file_block() argument
501 nilfs_segbuf_add_file_buffer(segbuf, bh); in nilfs_segctor_add_file_block()
511 struct buffer_head *bh, struct inode *inode) in nilfs_collect_file_data() argument
515 err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_file_data()
519 err = nilfs_segctor_add_file_block(sci, bh, inode, in nilfs_collect_file_data()
527 struct buffer_head *bh, in nilfs_collect_file_node() argument
530 return nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_file_node()
534 struct buffer_head *bh, in nilfs_collect_file_bmap() argument
537 WARN_ON(!buffer_dirty(bh)); in nilfs_collect_file_bmap()
538 return nilfs_segctor_add_file_block(sci, bh, inode, sizeof(__le64)); in nilfs_collect_file_bmap()
568 struct buffer_head *bh, struct inode *inode) in nilfs_collect_dat_data() argument
572 err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_dat_data()
576 err = nilfs_segctor_add_file_block(sci, bh, inode, sizeof(__le64)); in nilfs_collect_dat_data()
583 struct buffer_head *bh, struct inode *inode) in nilfs_collect_dat_bmap() argument
585 WARN_ON(!buffer_dirty(bh)); in nilfs_collect_dat_bmap()
586 return nilfs_segctor_add_file_block(sci, bh, inode, in nilfs_collect_dat_bmap()
653 struct buffer_head *bh, *head; in nilfs_lookup_dirty_data_buffers() local
664 bh = head = page_buffers(page); in nilfs_lookup_dirty_data_buffers()
666 if (!buffer_dirty(bh) || buffer_async_write(bh)) in nilfs_lookup_dirty_data_buffers()
668 get_bh(bh); in nilfs_lookup_dirty_data_buffers()
669 list_add_tail(&bh->b_assoc_buffers, listp); in nilfs_lookup_dirty_data_buffers()
676 } while (bh = bh->b_this_page, bh != head); in nilfs_lookup_dirty_data_buffers()
689 struct buffer_head *bh, *head; in nilfs_lookup_dirty_node_buffers() local
698 bh = head = page_buffers(pvec.pages[i]); in nilfs_lookup_dirty_node_buffers()
700 if (buffer_dirty(bh) && in nilfs_lookup_dirty_node_buffers()
701 !buffer_async_write(bh)) { in nilfs_lookup_dirty_node_buffers()
702 get_bh(bh); in nilfs_lookup_dirty_node_buffers()
703 list_add_tail(&bh->b_assoc_buffers, in nilfs_lookup_dirty_node_buffers()
706 bh = bh->b_this_page; in nilfs_lookup_dirty_node_buffers()
707 } while (bh != head); in nilfs_lookup_dirty_node_buffers()
952 struct buffer_head *bh, *n; in nilfs_segctor_apply_buffers() local
956 list_for_each_entry_safe(bh, n, listp, b_assoc_buffers) { in nilfs_segctor_apply_buffers()
957 list_del_init(&bh->b_assoc_buffers); in nilfs_segctor_apply_buffers()
958 err = collect(sci, bh, inode); in nilfs_segctor_apply_buffers()
959 brelse(bh); in nilfs_segctor_apply_buffers()
968 bh = list_first_entry(listp, struct buffer_head, in nilfs_segctor_apply_buffers()
970 list_del_init(&bh->b_assoc_buffers); in nilfs_segctor_apply_buffers()
971 brelse(bh); in nilfs_segctor_apply_buffers()
1495 struct buffer_head *bh, *bh_org; in nilfs_segctor_update_payload_blocknr() local
1503 ssp.bh = NILFS_SEGBUF_FIRST_BH(&segbuf->sb_segsum_buffers); in nilfs_segctor_update_payload_blocknr()
1506 list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) { in nilfs_segctor_update_payload_blocknr()
1507 if (bh == segbuf->sb_super_root) in nilfs_segctor_update_payload_blocknr()
1516 inode = bh->b_page->mapping->host; in nilfs_segctor_update_payload_blocknr()
1525 bh_org = bh; in nilfs_segctor_update_payload_blocknr()
1527 err = nilfs_bmap_assign(NILFS_I(inode)->i_bmap, &bh, blocknr, in nilfs_segctor_update_payload_blocknr()
1529 if (bh != bh_org) in nilfs_segctor_update_payload_blocknr()
1530 nilfs_list_replace_buffer(bh_org, bh); in nilfs_segctor_update_payload_blocknr()
1588 struct buffer_head *bh; in nilfs_segctor_prepare_write() local
1590 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, in nilfs_segctor_prepare_write()
1592 if (bh->b_page != bd_page) { in nilfs_segctor_prepare_write()
1599 bd_page = bh->b_page; in nilfs_segctor_prepare_write()
1603 list_for_each_entry(bh, &segbuf->sb_payload_buffers, in nilfs_segctor_prepare_write()
1605 set_buffer_async_write(bh); in nilfs_segctor_prepare_write()
1606 if (bh == segbuf->sb_super_root) { in nilfs_segctor_prepare_write()
1607 if (bh->b_page != bd_page) { in nilfs_segctor_prepare_write()
1612 bd_page = bh->b_page; in nilfs_segctor_prepare_write()
1616 if (bh->b_page != fs_page) { in nilfs_segctor_prepare_write()
1618 fs_page = bh->b_page; in nilfs_segctor_prepare_write()
1683 struct buffer_head *bh; in nilfs_abort_logs() local
1689 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, in nilfs_abort_logs()
1691 if (bh->b_page != bd_page) { in nilfs_abort_logs()
1694 bd_page = bh->b_page; in nilfs_abort_logs()
1698 list_for_each_entry(bh, &segbuf->sb_payload_buffers, in nilfs_abort_logs()
1700 clear_buffer_async_write(bh); in nilfs_abort_logs()
1701 if (bh == segbuf->sb_super_root) { in nilfs_abort_logs()
1702 if (bh->b_page != bd_page) { in nilfs_abort_logs()
1704 bd_page = bh->b_page; in nilfs_abort_logs()
1708 if (bh->b_page != fs_page) { in nilfs_abort_logs()
1710 fs_page = bh->b_page; in nilfs_abort_logs()
1764 struct buffer_head *bh; in nilfs_segctor_complete_write() local
1766 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, in nilfs_segctor_complete_write()
1768 set_buffer_uptodate(bh); in nilfs_segctor_complete_write()
1769 clear_buffer_dirty(bh); in nilfs_segctor_complete_write()
1770 if (bh->b_page != bd_page) { in nilfs_segctor_complete_write()
1773 bd_page = bh->b_page; in nilfs_segctor_complete_write()
1787 list_for_each_entry(bh, &segbuf->sb_payload_buffers, in nilfs_segctor_complete_write()
1795 set_mask_bits(&bh->b_state, clear_bits, set_bits); in nilfs_segctor_complete_write()
1796 if (bh == segbuf->sb_super_root) { in nilfs_segctor_complete_write()
1797 if (bh->b_page != bd_page) { in nilfs_segctor_complete_write()
1799 bd_page = bh->b_page; in nilfs_segctor_complete_write()
1804 if (bh->b_page != fs_page) { in nilfs_segctor_complete_write()
1806 fs_page = bh->b_page; in nilfs_segctor_complete_write()