• Home
  • Raw
  • Download

Lines Matching refs:bio

94 	struct bio *bio;  member
115 struct bio *bio; in submit_one_bio() local
120 if (!bio_ctrl->bio) in submit_one_bio()
123 bio = bio_ctrl->bio; in submit_one_bio()
124 bv = bio_first_bvec_all(bio); in submit_one_bio()
129 ASSERT(bio->bi_iter.bi_size); in submit_one_bio()
131 btrfs_bio(bio)->file_offset = page_offset(bv->bv_page) + bv->bv_offset; in submit_one_bio()
134 btrfs_submit_metadata_bio(inode, bio, mirror_num); in submit_one_bio()
135 else if (btrfs_op(bio) == BTRFS_MAP_WRITE) in submit_one_bio()
136 btrfs_submit_data_write_bio(inode, bio, mirror_num); in submit_one_bio()
138 btrfs_submit_data_read_bio(inode, bio, mirror_num, in submit_one_bio()
142 bio_ctrl->bio = NULL; in submit_one_bio()
150 struct bio *bio = epd->bio_ctrl.bio; in submit_write_bio() local
152 if (!bio) in submit_write_bio()
157 btrfs_bio_end_io(btrfs_bio(bio), errno_to_blk_status(ret)); in submit_write_bio()
159 epd->bio_ctrl.bio = NULL; in submit_write_bio()
547 struct bio bio; in repair_io_failure() local
606 bio_init(&bio, dev->bdev, &bvec, 1, REQ_OP_WRITE | REQ_SYNC); in repair_io_failure()
607 bio.bi_iter.bi_sector = sector; in repair_io_failure()
608 __bio_add_page(&bio, page, length, pg_offset); in repair_io_failure()
610 btrfsic_check_bio(&bio); in repair_io_failure()
611 ret = submit_bio_wait(&bio); in repair_io_failure()
625 bio_uninit(&bio); in repair_io_failure()
811 struct bio *failed_bio = &failed_bbio->bio; in btrfs_repair_one_sector()
813 struct bio *repair_bio; in btrfs_repair_one_sector()
929 BUG_ON(bio_op(&failed_bbio->bio) == REQ_OP_WRITE); in submit_data_read_repair()
941 ASSERT(page->mapping && !bio_flagged(&failed_bbio->bio, BIO_CLONED)); in submit_data_read_repair()
1016 struct bio *bio = &bbio->bio; in end_bio_extent_writepage() local
1017 int error = blk_status_to_errno(bio->bi_status); in end_bio_extent_writepage()
1024 ASSERT(!bio_flagged(bio, BIO_CLONED)); in end_bio_extent_writepage()
1025 bio_for_each_segment_all(bvec, bio, iter_all) { in end_bio_extent_writepage()
1045 btrfs_record_physical_zoned(inode, start, bio); in end_bio_extent_writepage()
1054 bio_put(bio); in end_bio_extent_writepage()
1178 struct bio *bio = &bbio->bio; in end_bio_extent_readpage() local
1189 ASSERT(!bio_flagged(bio, BIO_CLONED)); in end_bio_extent_readpage()
1190 bio_for_each_segment_all(bvec, bio, iter_all) { in end_bio_extent_readpage()
1191 bool uptodate = !bio->bi_status; in end_bio_extent_readpage()
1204 bio->bi_iter.bi_sector, bio->bi_status, in end_bio_extent_readpage()
1306 bio_put(bio); in end_bio_extent_readpage()
1368 struct bio *bio = bio_ctrl->bio; in btrfs_bio_add_page() local
1369 u32 bio_size = bio->bi_iter.bi_size; in btrfs_bio_add_page()
1375 ASSERT(bio); in btrfs_bio_add_page()
1382 if (bio->bi_iter.bi_size == 0) { in btrfs_bio_add_page()
1386 struct bio_vec *bvec = bio_last_bvec_all(bio); in btrfs_bio_add_page()
1398 if (bio_end_sector(bio) == sector && in btrfs_bio_add_page()
1407 contig = bio->bi_iter.bi_sector == sector; in btrfs_bio_add_page()
1424 if (bio_op(bio) == REQ_OP_ZONE_APPEND) in btrfs_bio_add_page()
1425 ret = bio_add_zone_append_page(bio, page, real_size, pg_offset); in btrfs_bio_add_page()
1427 ret = bio_add_page(bio, page, real_size, pg_offset); in btrfs_bio_add_page()
1439 u64 logical = (bio_ctrl->bio->bi_iter.bi_sector << SECTOR_SHIFT); in calc_bio_boundaries()
1457 ret = btrfs_get_io_geometry(fs_info, em, btrfs_op(bio_ctrl->bio), in calc_bio_boundaries()
1468 if (bio_op(bio_ctrl->bio) != REQ_OP_ZONE_APPEND) { in calc_bio_boundaries()
1494 struct bio *bio; in alloc_new_bio() local
1499 bio = btrfs_bio_alloc(BIO_MAX_VECS, opf, bio_ctrl->end_io_func, NULL); in alloc_new_bio()
1505 bio->bi_iter.bi_sector = disk_bytenr >> SECTOR_SHIFT; in alloc_new_bio()
1507 bio->bi_iter.bi_sector = (disk_bytenr + offset) >> SECTOR_SHIFT; in alloc_new_bio()
1508 bio_ctrl->bio = bio; in alloc_new_bio()
1520 if (bio_op(bio) == REQ_OP_ZONE_APPEND) { in alloc_new_bio()
1530 bio_set_dev(bio, dev->bdev); in alloc_new_bio()
1539 bio_set_dev(bio, fs_info->fs_devices->latest_dev->bdev); in alloc_new_bio()
1541 wbc_init_bio(wbc, bio); in alloc_new_bio()
1543 ASSERT(bio_op(bio) != REQ_OP_ZONE_APPEND); in alloc_new_bio()
1547 bio_ctrl->bio = NULL; in alloc_new_bio()
1548 btrfs_bio_end_io(btrfs_bio(bio), errno_to_blk_status(ret)); in alloc_new_bio()
1594 if (!bio_ctrl->bio) { in submit_extent_page()
1626 ASSERT(bio_ctrl->bio->bi_iter.bi_size); in submit_extent_page()
2568 struct bio *bio = &bbio->bio; in end_bio_subpage_eb_writepage() local
2573 fs_info = btrfs_sb(bio_first_page_all(bio)->mapping->host->i_sb); in end_bio_subpage_eb_writepage()
2576 ASSERT(!bio_flagged(bio, BIO_CLONED)); in end_bio_subpage_eb_writepage()
2577 bio_for_each_segment_all(bvec, bio, iter_all) { in end_bio_subpage_eb_writepage()
2604 if (bio->bi_status || in end_bio_subpage_eb_writepage()
2621 bio_put(bio); in end_bio_subpage_eb_writepage()
2626 struct bio *bio = &bbio->bio; in end_bio_extent_buffer_writepage() local
2632 ASSERT(!bio_flagged(bio, BIO_CLONED)); in end_bio_extent_buffer_writepage()
2633 bio_for_each_segment_all(bvec, bio, iter_all) { in end_bio_extent_buffer_writepage()
2640 if (bio->bi_status || in end_bio_extent_buffer_writepage()
2654 bio_put(bio); in end_bio_extent_buffer_writepage()