diff options
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index c78b2a3fc335..53c3501fa4ca 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "dev-replace.h" | 28 | #include "dev-replace.h" |
29 | #include "check-integrity.h" | 29 | #include "check-integrity.h" |
30 | #include "rcu-string.h" | 30 | #include "rcu-string.h" |
31 | #include "raid56.h" | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * This is only the first step towards a full-features scrub. It reads all | 34 | * This is only the first step towards a full-features scrub. It reads all |
@@ -2254,6 +2255,13 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, | |||
2254 | struct btrfs_device *extent_dev; | 2255 | struct btrfs_device *extent_dev; |
2255 | int extent_mirror_num; | 2256 | int extent_mirror_num; |
2256 | 2257 | ||
2258 | if (map->type & (BTRFS_BLOCK_GROUP_RAID5 | | ||
2259 | BTRFS_BLOCK_GROUP_RAID6)) { | ||
2260 | if (num >= nr_data_stripes(map)) { | ||
2261 | return 0; | ||
2262 | } | ||
2263 | } | ||
2264 | |||
2257 | nstripes = length; | 2265 | nstripes = length; |
2258 | offset = 0; | 2266 | offset = 0; |
2259 | do_div(nstripes, map->stripe_len); | 2267 | do_div(nstripes, map->stripe_len); |