Lines Matching refs:bbio
63 struct btrfs_bio *bbio;
282 u64 num = rbio->bbio->raid_map[0];
573 if (last->bbio->raid_map[0] !=
574 cur->bbio->raid_map[0])
687 if (cur->bbio->raid_map[0] != rbio->bbio->raid_map[0])
852 btrfs_put_bbio(rbio->bbio);
926 0 : rbio->bbio->max_errors;
981 struct btrfs_bio *bbio,
986 int real_stripes = bbio->num_stripes - bbio->num_tgtdevs;
1007 rbio->bbio = bbio;
1035 if (bbio->map_type & BTRFS_BLOCK_GROUP_RAID5)
1037 else if (bbio->map_type & BTRFS_BLOCK_GROUP_RAID6)
1100 stripe = &rbio->bbio->stripes[stripe_nr];
1176 stripe_offset = start - rbio->bbio->raid_map[0];
1200 struct btrfs_bio *bbio = rbio->bbio;
1315 if (likely(!bbio->num_tgtdevs))
1319 if (!bbio->tgtdev_map[stripe])
1338 rbio->bbio->tgtdev_map[stripe],
1379 for (i = 0; i < rbio->bbio->num_stripes; i++) {
1380 stripe = &rbio->bbio->stripes[i];
1403 u64 stripe_start = rbio->bbio->raid_map[i];
1494 if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
1576 * the bbio may be freed once we submit the last bio. Make sure
1759 const u64 full_stripe_start = rbio->bbio->raid_map[0];
1785 struct btrfs_bio *bbio, u64 stripe_len)
1792 rbio = alloc_rbio(fs_info, bbio, stripe_len);
1794 btrfs_put_bbio(bbio);
1891 if (rbio->bbio->map_type & BTRFS_BLOCK_GROUP_RAID6) {
1923 if (rbio->bbio->raid_map[failb] == RAID6_Q_STRIPE) {
1924 if (rbio->bbio->raid_map[faila] ==
1936 if (rbio->bbio->raid_map[failb] == RAID5_P_STRIPE) {
2065 if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
2126 if (atomic_read(&rbio->error) <= rbio->bbio->max_errors) {
2135 * the bbio may be freed once we submit the last bio. Make sure
2169 struct btrfs_bio *bbio, u64 stripe_len,
2176 ASSERT(bbio->mirror_num == mirror_num);
2180 rbio = alloc_rbio(fs_info, bbio, stripe_len);
2183 btrfs_put_bbio(bbio);
2193 "%s could not find the bad stripe in raid56 so that we cannot recover any more (bio has logical %llu len %llu, bbio has map_type %llu)",
2195 (u64)bio->bi_iter.bi_size, bbio->map_type);
2197 btrfs_put_bbio(bbio);
2206 btrfs_get_bbio(bbio);
2265 * Caller must have already increased bio_counter for getting @bbio.
2274 struct btrfs_bio *bbio, u64 stripe_len,
2281 rbio = alloc_rbio(fs_info, bbio, stripe_len);
2293 * After mapping bbio with BTRFS_MAP_WRITE, parities have been sorted
2298 if (bbio->stripes[i].dev == scrub_dev) {
2311 * We have already increased bio_counter when getting bbio, record it
2326 ASSERT(logical >= rbio->bbio->raid_map[0]);
2327 ASSERT(logical + PAGE_SIZE <= rbio->bbio->raid_map[0] +
2329 stripe_offset = (int)(logical - rbio->bbio->raid_map[0]);
2363 struct btrfs_bio *bbio = rbio->bbio;
2386 if (bbio->num_tgtdevs && bbio->tgtdev_map[rbio->scrubp]) {
2486 bbio->tgtdev_map[rbio->scrubp],
2534 if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
2555 if (dfail > rbio->bbio->max_errors - 1)
2676 * the bbio may be freed once we submit the last bio. Make sure
2722 struct btrfs_bio *bbio, u64 length)
2726 rbio = alloc_rbio(fs_info, bbio, length);
2746 * When we get bbio, we have already increased bio_counter, record it