Lines Matching refs:bioc

101 		struct btrfs_io_context *orig_bioc = orig_stripe->bioc;  in btrfs_bbio_propagate_error()
338 struct btrfs_io_context *bioc = bio->bi_private; in btrfs_raid56_end_io() local
341 btrfs_bio_counter_dec(bioc->fs_info); in btrfs_raid56_end_io()
342 bbio->mirror_num = bioc->mirror_num; in btrfs_raid56_end_io()
348 btrfs_put_bioc(bioc); in btrfs_raid56_end_io()
354 struct btrfs_io_context *bioc = stripe->bioc; in btrfs_orig_write_end_io() local
357 btrfs_bio_counter_dec(bioc->fs_info); in btrfs_orig_write_end_io()
360 atomic_inc(&bioc->error); in btrfs_orig_write_end_io()
368 if (atomic_read(&bioc->error) > bioc->max_errors) in btrfs_orig_write_end_io()
374 btrfs_put_bioc(bioc); in btrfs_orig_write_end_io()
382 atomic_inc(&stripe->bioc->error); in btrfs_clone_write_end_io()
387 bio_endio(stripe->bioc->orig_bio); in btrfs_clone_write_end_io()
424 static void btrfs_submit_mirrored_bio(struct btrfs_io_context *bioc, int dev_nr) in btrfs_submit_mirrored_bio() argument
426 struct bio *orig_bio = bioc->orig_bio, *bio; in btrfs_submit_mirrored_bio()
431 if (dev_nr == bioc->num_stripes - 1) { in btrfs_submit_mirrored_bio()
440 bio->bi_private = &bioc->stripes[dev_nr]; in btrfs_submit_mirrored_bio()
441 bio->bi_iter.bi_sector = bioc->stripes[dev_nr].physical >> SECTOR_SHIFT; in btrfs_submit_mirrored_bio()
442 bioc->stripes[dev_nr].bioc = bioc; in btrfs_submit_mirrored_bio()
443 btrfs_submit_dev_bio(bioc->stripes[dev_nr].dev, bio); in btrfs_submit_mirrored_bio()
446 static void __btrfs_submit_bio(struct bio *bio, struct btrfs_io_context *bioc, in __btrfs_submit_bio() argument
452 if (!bioc) { in __btrfs_submit_bio()
459 } else if (bioc->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) { in __btrfs_submit_bio()
461 bio->bi_private = bioc; in __btrfs_submit_bio()
464 raid56_parity_recover(bio, bioc, mirror_num); in __btrfs_submit_bio()
466 raid56_parity_write(bio, bioc); in __btrfs_submit_bio()
469 int total_devs = bioc->num_stripes; in __btrfs_submit_bio()
471 bioc->orig_bio = bio; in __btrfs_submit_bio()
473 btrfs_submit_mirrored_bio(bioc, dev_nr); in __btrfs_submit_bio()
490 struct btrfs_io_context *bioc; member
541 __btrfs_submit_bio(bio, async->bioc, &async->smap, async->mirror_num); in run_one_async_done()
582 struct btrfs_io_context *bioc, in btrfs_wq_submit_bio() argument
593 async->bioc = bioc; in btrfs_wq_submit_bio()
616 struct btrfs_io_context *bioc = NULL; in btrfs_submit_chunk() local
623 &bioc, &smap, &mirror_num, 1); in btrfs_submit_chunk()
666 btrfs_wq_submit_bio(bbio, bioc, &smap, mirror_num)) in btrfs_submit_chunk()
675 __btrfs_submit_bio(bio, bioc, &smap, mirror_num); in btrfs_submit_chunk()
714 struct btrfs_io_context *bioc = NULL; in btrfs_repair_io_failure() local
739 &map_length, &bioc, 0); in btrfs_repair_io_failure()
742 ASSERT(bioc->mirror_num == 1); in btrfs_repair_io_failure()
745 &map_length, &bioc, mirror_num); in btrfs_repair_io_failure()
756 if (mirror_num != bioc->mirror_num) in btrfs_repair_io_failure()
760 sector = bioc->stripes[bioc->mirror_num - 1].physical >> 9; in btrfs_repair_io_failure()
761 dev = bioc->stripes[bioc->mirror_num - 1].dev; in btrfs_repair_io_failure()
762 btrfs_put_bioc(bioc); in btrfs_repair_io_failure()