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