Lines Matching refs:bbio

100 	struct btrfs_bio *bbio;  member
110 struct btrfs_bio *bbio = bio_ctrl->bbio; in submit_one_bio() local
112 if (!bbio) in submit_one_bio()
116 ASSERT(bbio->bio.bi_iter.bi_size); in submit_one_bio()
118 if (btrfs_op(&bbio->bio) == BTRFS_MAP_READ && in submit_one_bio()
120 btrfs_submit_compressed_read(bbio); in submit_one_bio()
122 btrfs_submit_bio(bbio, 0); in submit_one_bio()
125 bio_ctrl->bbio = NULL; in submit_one_bio()
133 struct btrfs_bio *bbio = bio_ctrl->bbio; in submit_write_bio() local
135 if (!bbio) in submit_write_bio()
140 btrfs_bio_end_io(bbio, errno_to_blk_status(ret)); in submit_write_bio()
142 bio_ctrl->bbio = NULL; in submit_write_bio()
460 static void end_bio_extent_writepage(struct btrfs_bio *bbio) in end_bio_extent_writepage() argument
462 struct bio *bio = &bbio->bio; in end_bio_extent_writepage()
486 btrfs_finish_ordered_extent(bbio->ordered, page, start, len, !error); in end_bio_extent_writepage()
585 static void end_bio_extent_readpage(struct btrfs_bio *bbio) in end_bio_extent_readpage() argument
587 struct bio *bio = &bbio->bio; in end_bio_extent_readpage()
611 bbio->mirror_num); in end_bio_extent_readpage()
715 struct bio *bio = &bio_ctrl->bbio->bio; in btrfs_bio_is_contig()
748 struct btrfs_bio *bbio; in alloc_new_bio() local
750 bbio = btrfs_bio_alloc(BIO_MAX_VECS, bio_ctrl->opf, fs_info, in alloc_new_bio()
752 bbio->bio.bi_iter.bi_sector = disk_bytenr >> SECTOR_SHIFT; in alloc_new_bio()
753 bbio->inode = inode; in alloc_new_bio()
754 bbio->file_offset = file_offset; in alloc_new_bio()
755 bio_ctrl->bbio = bbio; in alloc_new_bio()
767 bbio->ordered = ordered; in alloc_new_bio()
776 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev); in alloc_new_bio()
777 wbc_init_bio(bio_ctrl->wbc, &bbio->bio); in alloc_new_bio()
802 if (bio_ctrl->bbio && in submit_extent_page()
810 if (!bio_ctrl->bbio) { in submit_extent_page()
822 if (bio_add_page(&bio_ctrl->bbio->bio, page, len, pg_offset) != len) { in submit_extent_page()
1611 static void extent_buffer_write_end_io(struct btrfs_bio *bbio) in extent_buffer_write_end_io() argument
1613 struct extent_buffer *eb = bbio->private; in extent_buffer_write_end_io()
1615 bool uptodate = !bbio->bio.bi_status; in extent_buffer_write_end_io()
1623 bio_for_each_segment_all(bvec, &bbio->bio, iter_all) { in extent_buffer_write_end_io()
1636 bio_put(&bbio->bio); in extent_buffer_write_end_io()
1671 struct btrfs_bio *bbio; in write_one_eb() local
1675 bbio = btrfs_bio_alloc(INLINE_EXTENT_BUFFER_PAGES, in write_one_eb()
1678 bbio->bio.bi_iter.bi_sector = eb->start >> SECTOR_SHIFT; in write_one_eb()
1679 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev); in write_one_eb()
1680 wbc_init_bio(wbc, &bbio->bio); in write_one_eb()
1681 bbio->inode = BTRFS_I(eb->fs_info->btree_inode); in write_one_eb()
1682 bbio->file_offset = eb->start; in write_one_eb()
1693 __bio_add_page(&bbio->bio, p, eb->len, eb->start - page_offset(p)); in write_one_eb()
1703 __bio_add_page(&bbio->bio, p, PAGE_SIZE, 0); in write_one_eb()
1709 btrfs_submit_bio(bbio, 0); in write_one_eb()
3958 static void extent_buffer_read_end_io(struct btrfs_bio *bbio) in extent_buffer_read_end_io() argument
3960 struct extent_buffer *eb = bbio->private; in extent_buffer_read_end_io()
3962 bool uptodate = !bbio->bio.bi_status; in extent_buffer_read_end_io()
3967 eb->read_mirror = bbio->mirror_num; in extent_buffer_read_end_io()
3970 btrfs_validate_extent_buffer(eb, &bbio->parent_check) < 0) in extent_buffer_read_end_io()
3980 bio_for_each_segment_all(bvec, &bbio->bio, iter_all) { in extent_buffer_read_end_io()
3998 bio_put(&bbio->bio); in extent_buffer_read_end_io()
4005 struct btrfs_bio *bbio; in read_extent_buffer_pages() local
4027 bbio = btrfs_bio_alloc(INLINE_EXTENT_BUFFER_PAGES, in read_extent_buffer_pages()
4030 bbio->bio.bi_iter.bi_sector = eb->start >> SECTOR_SHIFT; in read_extent_buffer_pages()
4031 bbio->inode = BTRFS_I(eb->fs_info->btree_inode); in read_extent_buffer_pages()
4032 bbio->file_offset = eb->start; in read_extent_buffer_pages()
4033 memcpy(&bbio->parent_check, check, sizeof(*check)); in read_extent_buffer_pages()
4035 __bio_add_page(&bbio->bio, eb->pages[0], eb->len, in read_extent_buffer_pages()
4039 __bio_add_page(&bbio->bio, eb->pages[i], PAGE_SIZE, 0); in read_extent_buffer_pages()
4041 btrfs_submit_bio(bbio, mirror_num); in read_extent_buffer_pages()