• Home
  • Raw
  • Download

Lines Matching refs:bh

58 static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)  in ntfs_end_buffer_async_read()  argument
67 page = bh->b_page; in ntfs_end_buffer_async_read()
75 set_buffer_uptodate(bh); in ntfs_end_buffer_async_read()
78 bh_offset(bh); in ntfs_end_buffer_async_read()
88 if (unlikely(file_ofs + bh->b_size > init_size)) { in ntfs_end_buffer_async_read()
97 memset(kaddr + bh_offset(bh) + ofs, 0, in ntfs_end_buffer_async_read()
98 bh->b_size - ofs); in ntfs_end_buffer_async_read()
104 clear_buffer_uptodate(bh); in ntfs_end_buffer_async_read()
107 "0x%llx.", (unsigned long long)bh->b_blocknr); in ntfs_end_buffer_async_read()
112 clear_buffer_async_read(bh); in ntfs_end_buffer_async_read()
113 unlock_buffer(bh); in ntfs_end_buffer_async_read()
114 tmp = bh; in ntfs_end_buffer_async_read()
125 } while (tmp != bh); in ntfs_end_buffer_async_read()
194 struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE]; in ntfs_read_block() local
218 bh = head = page_buffers(page); in ntfs_read_block()
219 BUG_ON(!bh); in ntfs_read_block()
250 if (unlikely(buffer_uptodate(bh))) in ntfs_read_block()
252 if (unlikely(buffer_mapped(bh))) { in ntfs_read_block()
253 arr[nr++] = bh; in ntfs_read_block()
256 bh->b_bdev = vol->sb->s_bdev; in ntfs_read_block()
281 bh->b_blocknr = ((lcn << vol->cluster_size_bits) in ntfs_read_block()
283 set_buffer_mapped(bh); in ntfs_read_block()
286 arr[nr++] = bh; in ntfs_read_block()
321 bh->b_blocknr = -1; in ntfs_read_block()
338 bh->b_blocknr = -1UL; in ntfs_read_block()
339 clear_buffer_mapped(bh); in ntfs_read_block()
343 set_buffer_uptodate(bh); in ntfs_read_block()
344 } while (i++, iblock++, (bh = bh->b_this_page) != head); in ntfs_read_block()
561 struct buffer_head *bh, *head; in ntfs_write_block() local
596 bh = head = page_buffers(page); in ntfs_write_block()
597 BUG_ON(!bh); in ntfs_write_block()
647 clear_buffer_dirty(bh); in ntfs_write_block()
648 set_buffer_uptodate(bh); in ntfs_write_block()
653 if (!buffer_dirty(bh)) in ntfs_write_block()
712 if (buffer_mapped(bh)) in ntfs_write_block()
716 bh->b_bdev = vol->sb->s_bdev; in ntfs_write_block()
737 bh->b_blocknr = ((lcn << vol->cluster_size_bits) + in ntfs_write_block()
739 set_buffer_mapped(bh); in ntfs_write_block()
749 bpos = (unsigned long *)(kaddr + bh_offset(bh)); in ntfs_write_block()
761 bh->b_blocknr = -1; in ntfs_write_block()
762 clear_buffer_dirty(bh); in ntfs_write_block()
793 bh->b_blocknr = -1; in ntfs_write_block()
794 clear_buffer_dirty(bh); in ntfs_write_block()
795 zero_user(page, bh_offset(bh), blocksize); in ntfs_write_block()
796 set_buffer_uptodate(bh); in ntfs_write_block()
803 bh->b_blocknr = -1; in ntfs_write_block()
812 } while (block++, (bh = bh->b_this_page) != head); in ntfs_write_block()
819 bh = head; in ntfs_write_block()
825 if (!buffer_uptodate(bh)) { in ntfs_write_block()
827 bh = head; in ntfs_write_block()
830 } while ((bh = bh->b_this_page) != head); in ntfs_write_block()
837 if (buffer_mapped(bh) && buffer_dirty(bh)) { in ntfs_write_block()
838 lock_buffer(bh); in ntfs_write_block()
839 if (test_clear_buffer_dirty(bh)) { in ntfs_write_block()
840 BUG_ON(!buffer_uptodate(bh)); in ntfs_write_block()
841 mark_buffer_async_write(bh); in ntfs_write_block()
843 unlock_buffer(bh); in ntfs_write_block()
850 clear_buffer_dirty(bh); in ntfs_write_block()
852 } while ((bh = bh->b_this_page) != head); in ntfs_write_block()
878 struct buffer_head *next = bh->b_this_page; in ntfs_write_block()
879 if (buffer_async_write(bh)) { in ntfs_write_block()
880 submit_bh(REQ_OP_WRITE, 0, bh); in ntfs_write_block()
883 bh = next; in ntfs_write_block()
884 } while (bh != head); in ntfs_write_block()
929 struct buffer_head *bh, *head, *tbh, *rec_start_bh; in ntfs_write_mst_block() local
960 bh = head = page_buffers(page); in ntfs_write_mst_block()
961 BUG_ON(!bh); in ntfs_write_mst_block()
984 clear_buffer_dirty(bh); in ntfs_write_mst_block()
985 set_buffer_uptodate(bh); in ntfs_write_mst_block()
997 clear_buffer_dirty(bh); in ntfs_write_mst_block()
1006 clear_buffer_dirty(bh); in ntfs_write_mst_block()
1009 if (!buffer_dirty(bh)) { in ntfs_write_mst_block()
1015 rec_start_bh = bh; in ntfs_write_mst_block()
1018 if (unlikely(!buffer_mapped(bh))) { in ntfs_write_mst_block()
1023 bh->b_bdev = vol->sb->s_bdev; in ntfs_write_mst_block()
1043 bh->b_blocknr = ((lcn << in ntfs_write_mst_block()
1046 set_buffer_mapped(bh); in ntfs_write_mst_block()
1075 bh->b_blocknr = -1; in ntfs_write_mst_block()
1093 if (rec_start_bh != bh) { in ntfs_write_mst_block()
1103 bh); in ntfs_write_mst_block()
1109 BUG_ON(!buffer_uptodate(bh)); in ntfs_write_mst_block()
1111 bhs[nr_bhs++] = bh; in ntfs_write_mst_block()
1112 } while (block++, (bh = bh->b_this_page) != head); in ntfs_write_mst_block()
1732 struct buffer_head *bh, *head, *buffers_to_free = NULL; in mark_ntfs_record_dirty() local
1741 bh = head = alloc_page_buffers(page, bh_size, 1); in mark_ntfs_record_dirty()
1747 set_buffer_uptodate(bh); in mark_ntfs_record_dirty()
1748 tail = bh; in mark_ntfs_record_dirty()
1749 bh = bh->b_this_page; in mark_ntfs_record_dirty()
1750 } while (bh); in mark_ntfs_record_dirty()
1754 buffers_to_free = bh; in mark_ntfs_record_dirty()
1756 bh = head = page_buffers(page); in mark_ntfs_record_dirty()
1757 BUG_ON(!bh); in mark_ntfs_record_dirty()
1759 bh_ofs = bh_offset(bh); in mark_ntfs_record_dirty()
1764 set_buffer_dirty(bh); in mark_ntfs_record_dirty()
1765 } while ((bh = bh->b_this_page) != head); in mark_ntfs_record_dirty()
1770 bh = buffers_to_free->b_this_page; in mark_ntfs_record_dirty()
1772 buffers_to_free = bh; in mark_ntfs_record_dirty()