• Home
  • Raw
  • Download

Lines Matching refs:bh

93 static void buffer_io_error(struct buffer_head *bh)  in buffer_io_error()  argument
96 bh->b_bdev, in buffer_io_error()
97 (unsigned long long)bh->b_blocknr); in buffer_io_error()
108 struct buffer_head *bh, *head; in ext4_finish_bio() local
123 bh = head = page_buffers(page); in ext4_finish_bio()
130 if (bh_offset(bh) < bio_start || in ext4_finish_bio()
131 bh_offset(bh) + bh->b_size > bio_end) { in ext4_finish_bio()
132 if (buffer_async_write(bh)) in ext4_finish_bio()
136 clear_buffer_async_write(bh); in ext4_finish_bio()
138 set_buffer_write_io_error(bh); in ext4_finish_bio()
139 buffer_io_error(bh); in ext4_finish_bio()
141 } while ((bh = bh->b_this_page) != head); in ext4_finish_bio()
395 struct buffer_head *bh) in io_submit_init_bio() argument
404 fscrypt_set_bio_crypt_ctx_bh(bio, bh, GFP_NOIO); in io_submit_init_bio()
405 bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); in io_submit_init_bio()
406 bio_set_dev(bio, bh->b_bdev); in io_submit_init_bio()
410 io->io_next_block = bh->b_blocknr; in io_submit_init_bio()
418 struct buffer_head *bh) in io_submit_add_bh() argument
422 if (io->io_bio && (bh->b_blocknr != io->io_next_block || in io_submit_add_bh()
423 !fscrypt_mergeable_bio_bh(io->io_bio, bh))) { in io_submit_add_bh()
428 io_submit_init_bio(io, bh); in io_submit_add_bh()
432 bh->b_size, bh_offset(bh)); in io_submit_add_bh()
433 if (ret != bh->b_size) in io_submit_add_bh()
435 wbc_account_cgroup_owner(io->io_wbc, pagecache_page, bh->b_size); in io_submit_add_bh()
447 struct buffer_head *bh, *head; in ext4_bio_write_page() local
480 bh = head = page_buffers(page); in ext4_bio_write_page()
482 block_start = bh_offset(bh); in ext4_bio_write_page()
484 clear_buffer_dirty(bh); in ext4_bio_write_page()
485 set_buffer_uptodate(bh); in ext4_bio_write_page()
488 if (!buffer_dirty(bh) || buffer_delay(bh) || in ext4_bio_write_page()
489 !buffer_mapped(bh) || buffer_unwritten(bh)) { in ext4_bio_write_page()
491 if (!buffer_mapped(bh)) in ext4_bio_write_page()
492 clear_buffer_dirty(bh); in ext4_bio_write_page()
497 if (buffer_new(bh)) in ext4_bio_write_page()
498 clear_buffer_new(bh); in ext4_bio_write_page()
499 set_buffer_async_write(bh); in ext4_bio_write_page()
501 } while ((bh = bh->b_this_page) != head); in ext4_bio_write_page()
503 bh = head = page_buffers(page); in ext4_bio_write_page()
542 clear_buffer_async_write(bh); in ext4_bio_write_page()
543 bh = bh->b_this_page; in ext4_bio_write_page()
544 } while (bh != head); in ext4_bio_write_page()
551 if (!buffer_async_write(bh)) in ext4_bio_write_page()
553 io_submit_add_bh(io, inode, page, bounce_page, bh); in ext4_bio_write_page()
555 clear_buffer_dirty(bh); in ext4_bio_write_page()
556 } while ((bh = bh->b_this_page) != head); in ext4_bio_write_page()