Lines Matching refs:bioc
61 struct btrfs_io_context *bioc; member
427 (sector->recover->bioc->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK); in scrub_is_page_on_raid56()
974 btrfs_put_bioc(recover->bioc); in scrub_put_recover()
1216 int max_allowed = r->bioc->num_stripes - r->bioc->num_tgtdevs; in scrub_handle_errored_block()
1405 static inline int scrub_nr_raid_mirrors(struct btrfs_io_context *bioc) in scrub_nr_raid_mirrors() argument
1407 if (bioc->map_type & BTRFS_BLOCK_GROUP_RAID5) in scrub_nr_raid_mirrors()
1409 else if (bioc->map_type & BTRFS_BLOCK_GROUP_RAID6) in scrub_nr_raid_mirrors()
1412 return (int)bioc->num_stripes; in scrub_nr_raid_mirrors()
1455 struct btrfs_io_context *bioc; in scrub_setup_recheck_block() local
1468 bioc = NULL; in scrub_setup_recheck_block()
1476 logical, &mapped_length, &bioc); in scrub_setup_recheck_block()
1477 if (ret || !bioc || mapped_length < sublen) { in scrub_setup_recheck_block()
1478 btrfs_put_bioc(bioc); in scrub_setup_recheck_block()
1485 btrfs_put_bioc(bioc); in scrub_setup_recheck_block()
1491 recover->bioc = bioc; in scrub_setup_recheck_block()
1496 nmirrors = min(scrub_nr_raid_mirrors(bioc), BTRFS_MAX_MIRRORS); in scrub_setup_recheck_block()
1523 bioc->map_type, in scrub_setup_recheck_block()
1524 bioc->raid_map, in scrub_setup_recheck_block()
1525 bioc->num_stripes - in scrub_setup_recheck_block()
1526 bioc->num_tgtdevs, in scrub_setup_recheck_block()
1536 bioc->stripes[stripe_index].physical + in scrub_setup_recheck_block()
1538 sblock->dev = bioc->stripes[stripe_index].dev; in scrub_setup_recheck_block()
1571 raid56_parity_recover(bio, sector->recover->bioc, sector->sblock->mirror_num); in scrub_submit_raid56_bio_wait()
2344 struct btrfs_io_context *bioc = NULL; in scrub_missing_raid56_pages() local
2352 &length, &bioc); in scrub_missing_raid56_pages()
2353 if (ret || !bioc || !bioc->raid_map) in scrub_missing_raid56_pages()
2357 !(bioc->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK))) { in scrub_missing_raid56_pages()
2372 rbio = raid56_alloc_missing_rbio(bio, bioc); in scrub_missing_raid56_pages()
2388 btrfs_put_bioc(bioc); in scrub_missing_raid56_pages()
2395 btrfs_put_bioc(bioc); in scrub_missing_raid56_pages()
2948 struct btrfs_io_context *bioc = NULL; in scrub_parity_check_and_repair() local
2960 &length, &bioc); in scrub_parity_check_and_repair()
2961 if (ret || !bioc || !bioc->raid_map) in scrub_parity_check_and_repair()
2969 rbio = raid56_parity_alloc_scrub_rbio(bio, bioc, in scrub_parity_check_and_repair()
2973 btrfs_put_bioc(bioc); in scrub_parity_check_and_repair()
3161 struct btrfs_io_context *bioc = NULL; in scrub_raid56_data_stripe_for_parity() local
3210 &mapped_length, &bioc, 0); in scrub_raid56_data_stripe_for_parity()
3211 if (!ret && (!bioc || mapped_length < extent_size)) in scrub_raid56_data_stripe_for_parity()
3214 btrfs_put_bioc(bioc); in scrub_raid56_data_stripe_for_parity()
3219 extent_physical = bioc->stripes[0].physical; in scrub_raid56_data_stripe_for_parity()
3220 extent_mirror_num = bioc->mirror_num; in scrub_raid56_data_stripe_for_parity()
3221 extent_dev = bioc->stripes[0].dev; in scrub_raid56_data_stripe_for_parity()
3222 btrfs_put_bioc(bioc); in scrub_raid56_data_stripe_for_parity()
4504 struct btrfs_io_context *bioc = NULL; in scrub_find_good_copy() local
4509 &mapped_length, &bioc, 0); in scrub_find_good_copy()
4510 if (ret || !bioc || mapped_length < extent_len || in scrub_find_good_copy()
4511 !bioc->stripes[0].dev->bdev) { in scrub_find_good_copy()
4512 btrfs_put_bioc(bioc); in scrub_find_good_copy()
4516 *extent_physical = bioc->stripes[0].physical; in scrub_find_good_copy()
4517 *extent_mirror_num = bioc->mirror_num; in scrub_find_good_copy()
4518 *extent_dev = bioc->stripes[0].dev; in scrub_find_good_copy()
4519 btrfs_put_bioc(bioc); in scrub_find_good_copy()