|
@@ -3105,22 +3105,6 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
|
|
*/
|
|
*/
|
|
ret = 0;
|
|
ret = 0;
|
|
while (physical < physical_end) {
|
|
while (physical < physical_end) {
|
|
- /* for raid56, we skip parity stripe */
|
|
|
|
- if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK) {
|
|
|
|
- ret = get_raid56_logic_offset(physical, num,
|
|
|
|
- map, &logical, &stripe_logical);
|
|
|
|
- logical += base;
|
|
|
|
- if (ret) {
|
|
|
|
- stripe_logical += base;
|
|
|
|
- stripe_end = stripe_logical + increment - 1;
|
|
|
|
- ret = scrub_raid56_parity(sctx, map, scrub_dev,
|
|
|
|
- ppath, stripe_logical,
|
|
|
|
- stripe_end);
|
|
|
|
- if (ret)
|
|
|
|
- goto out;
|
|
|
|
- goto skip;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
/*
|
|
/*
|
|
* canceled?
|
|
* canceled?
|
|
*/
|
|
*/
|
|
@@ -3145,6 +3129,24 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
|
|
scrub_blocked_if_needed(fs_info);
|
|
scrub_blocked_if_needed(fs_info);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* for raid56, we skip parity stripe */
|
|
|
|
+ if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK) {
|
|
|
|
+ ret = get_raid56_logic_offset(physical, num, map,
|
|
|
|
+ &logical,
|
|
|
|
+ &stripe_logical);
|
|
|
|
+ logical += base;
|
|
|
|
+ if (ret) {
|
|
|
|
+ stripe_logical += base;
|
|
|
|
+ stripe_end = stripe_logical + increment - 1;
|
|
|
|
+ ret = scrub_raid56_parity(sctx, map, scrub_dev,
|
|
|
|
+ ppath, stripe_logical,
|
|
|
|
+ stripe_end);
|
|
|
|
+ if (ret)
|
|
|
|
+ goto out;
|
|
|
|
+ goto skip;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if (btrfs_fs_incompat(fs_info, SKINNY_METADATA))
|
|
if (btrfs_fs_incompat(fs_info, SKINNY_METADATA))
|
|
key.type = BTRFS_METADATA_ITEM_KEY;
|
|
key.type = BTRFS_METADATA_ITEM_KEY;
|
|
else
|
|
else
|