Lines Matching refs:bh
408 BUG_ON(NILFS_SEGBUF_BH_IS_LAST(ssp->bh, in nilfs_segctor_map_segsum_entry()
410 ssp->bh = NILFS_SEGBUF_NEXT_BH(ssp->bh); in nilfs_segctor_map_segsum_entry()
412 p = ssp->bh->b_data + ssp->offset; in nilfs_segctor_map_segsum_entry()
437 sci->sc_finfo_ptr.bh = sumbh; sci->sc_finfo_ptr.offset = sumbytes; in nilfs_segctor_reset_segment_buffer()
438 sci->sc_binfo_ptr.bh = sumbh; sci->sc_binfo_ptr.offset = sumbytes; in nilfs_segctor_reset_segment_buffer()
534 struct buffer_head *bh, in nilfs_segctor_add_file_block() argument
562 nilfs_segbuf_add_file_buffer(segbuf, bh); in nilfs_segctor_add_file_block()
572 struct buffer_head *bh, struct inode *inode) in nilfs_collect_file_data() argument
576 err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_file_data()
580 err = nilfs_segctor_add_file_block(sci, bh, inode, in nilfs_collect_file_data()
588 struct buffer_head *bh, in nilfs_collect_file_node() argument
591 return nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_file_node()
595 struct buffer_head *bh, in nilfs_collect_file_bmap() argument
598 WARN_ON(!buffer_dirty(bh)); in nilfs_collect_file_bmap()
599 return nilfs_segctor_add_file_block(sci, bh, inode, sizeof(__le64)); in nilfs_collect_file_bmap()
629 struct buffer_head *bh, struct inode *inode) in nilfs_collect_dat_data() argument
633 err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_dat_data()
637 err = nilfs_segctor_add_file_block(sci, bh, inode, sizeof(__le64)); in nilfs_collect_dat_data()
644 struct buffer_head *bh, struct inode *inode) in nilfs_collect_dat_bmap() argument
646 WARN_ON(!buffer_dirty(bh)); in nilfs_collect_dat_bmap()
647 return nilfs_segctor_add_file_block(sci, bh, inode, in nilfs_collect_dat_bmap()
714 struct buffer_head *bh, *head; in nilfs_lookup_dirty_data_buffers() local
725 bh = head = page_buffers(page); in nilfs_lookup_dirty_data_buffers()
727 if (!buffer_dirty(bh) || buffer_async_write(bh)) in nilfs_lookup_dirty_data_buffers()
729 get_bh(bh); in nilfs_lookup_dirty_data_buffers()
730 list_add_tail(&bh->b_assoc_buffers, listp); in nilfs_lookup_dirty_data_buffers()
737 } while (bh = bh->b_this_page, bh != head); in nilfs_lookup_dirty_data_buffers()
750 struct buffer_head *bh, *head; in nilfs_lookup_dirty_node_buffers() local
759 bh = head = page_buffers(pvec.pages[i]); in nilfs_lookup_dirty_node_buffers()
761 if (buffer_dirty(bh) && in nilfs_lookup_dirty_node_buffers()
762 !buffer_async_write(bh)) { in nilfs_lookup_dirty_node_buffers()
763 get_bh(bh); in nilfs_lookup_dirty_node_buffers()
764 list_add_tail(&bh->b_assoc_buffers, in nilfs_lookup_dirty_node_buffers()
767 bh = bh->b_this_page; in nilfs_lookup_dirty_node_buffers()
768 } while (bh != head); in nilfs_lookup_dirty_node_buffers()
1013 struct buffer_head *bh, *n; in nilfs_segctor_apply_buffers() local
1017 list_for_each_entry_safe(bh, n, listp, b_assoc_buffers) { in nilfs_segctor_apply_buffers()
1018 list_del_init(&bh->b_assoc_buffers); in nilfs_segctor_apply_buffers()
1019 err = collect(sci, bh, inode); in nilfs_segctor_apply_buffers()
1020 brelse(bh); in nilfs_segctor_apply_buffers()
1029 bh = list_first_entry(listp, struct buffer_head, in nilfs_segctor_apply_buffers()
1031 list_del_init(&bh->b_assoc_buffers); in nilfs_segctor_apply_buffers()
1032 brelse(bh); in nilfs_segctor_apply_buffers()
1557 struct buffer_head *bh, *bh_org; in nilfs_segctor_update_payload_blocknr() local
1565 ssp.bh = NILFS_SEGBUF_FIRST_BH(&segbuf->sb_segsum_buffers); in nilfs_segctor_update_payload_blocknr()
1568 list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) { in nilfs_segctor_update_payload_blocknr()
1569 if (bh == segbuf->sb_super_root) in nilfs_segctor_update_payload_blocknr()
1578 inode = bh->b_page->mapping->host; in nilfs_segctor_update_payload_blocknr()
1587 bh_org = bh; in nilfs_segctor_update_payload_blocknr()
1589 err = nilfs_bmap_assign(NILFS_I(inode)->i_bmap, &bh, blocknr, in nilfs_segctor_update_payload_blocknr()
1591 if (bh != bh_org) in nilfs_segctor_update_payload_blocknr()
1592 nilfs_list_replace_buffer(bh_org, bh); in nilfs_segctor_update_payload_blocknr()
1650 struct buffer_head *bh; in nilfs_segctor_prepare_write() local
1652 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, in nilfs_segctor_prepare_write()
1654 if (bh->b_page != bd_page) { in nilfs_segctor_prepare_write()
1661 bd_page = bh->b_page; in nilfs_segctor_prepare_write()
1665 list_for_each_entry(bh, &segbuf->sb_payload_buffers, in nilfs_segctor_prepare_write()
1667 set_buffer_async_write(bh); in nilfs_segctor_prepare_write()
1668 if (bh == segbuf->sb_super_root) { in nilfs_segctor_prepare_write()
1669 if (bh->b_page != bd_page) { in nilfs_segctor_prepare_write()
1674 bd_page = bh->b_page; in nilfs_segctor_prepare_write()
1678 if (bh->b_page != fs_page) { in nilfs_segctor_prepare_write()
1680 fs_page = bh->b_page; in nilfs_segctor_prepare_write()
1745 struct buffer_head *bh; in nilfs_abort_logs() local
1751 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, in nilfs_abort_logs()
1753 if (bh->b_page != bd_page) { in nilfs_abort_logs()
1756 bd_page = bh->b_page; in nilfs_abort_logs()
1760 list_for_each_entry(bh, &segbuf->sb_payload_buffers, in nilfs_abort_logs()
1762 clear_buffer_async_write(bh); in nilfs_abort_logs()
1763 if (bh == segbuf->sb_super_root) { in nilfs_abort_logs()
1764 if (bh->b_page != bd_page) { in nilfs_abort_logs()
1766 bd_page = bh->b_page; in nilfs_abort_logs()
1770 if (bh->b_page != fs_page) { in nilfs_abort_logs()
1772 fs_page = bh->b_page; in nilfs_abort_logs()
1826 struct buffer_head *bh; in nilfs_segctor_complete_write() local
1828 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, in nilfs_segctor_complete_write()
1830 set_buffer_uptodate(bh); in nilfs_segctor_complete_write()
1831 clear_buffer_dirty(bh); in nilfs_segctor_complete_write()
1832 if (bh->b_page != bd_page) { in nilfs_segctor_complete_write()
1835 bd_page = bh->b_page; in nilfs_segctor_complete_write()
1849 list_for_each_entry(bh, &segbuf->sb_payload_buffers, in nilfs_segctor_complete_write()
1857 set_mask_bits(&bh->b_state, clear_bits, set_bits); in nilfs_segctor_complete_write()
1858 if (bh == segbuf->sb_super_root) { in nilfs_segctor_complete_write()
1859 if (bh->b_page != bd_page) { in nilfs_segctor_complete_write()
1861 bd_page = bh->b_page; in nilfs_segctor_complete_write()
1866 if (bh->b_page != fs_page) { in nilfs_segctor_complete_write()
1868 fs_page = bh->b_page; in nilfs_segctor_complete_write()