diff options
Diffstat (limited to 'fs/btrfs/scrub.c')
| -rw-r--r-- | fs/btrfs/scrub.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 9770cc5bfb76..abc0fbffa510 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
| @@ -1367,7 +1367,8 @@ out: | |||
| 1367 | } | 1367 | } |
| 1368 | 1368 | ||
| 1369 | static noinline_for_stack int scrub_chunk(struct scrub_dev *sdev, | 1369 | static noinline_for_stack int scrub_chunk(struct scrub_dev *sdev, |
| 1370 | u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 length) | 1370 | u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 length, |
| 1371 | u64 dev_offset) | ||
| 1371 | { | 1372 | { |
| 1372 | struct btrfs_mapping_tree *map_tree = | 1373 | struct btrfs_mapping_tree *map_tree = |
| 1373 | &sdev->dev->dev_root->fs_info->mapping_tree; | 1374 | &sdev->dev->dev_root->fs_info->mapping_tree; |
| @@ -1391,7 +1392,8 @@ static noinline_for_stack int scrub_chunk(struct scrub_dev *sdev, | |||
| 1391 | goto out; | 1392 | goto out; |
| 1392 | 1393 | ||
| 1393 | for (i = 0; i < map->num_stripes; ++i) { | 1394 | for (i = 0; i < map->num_stripes; ++i) { |
| 1394 | if (map->stripes[i].dev == sdev->dev) { | 1395 | if (map->stripes[i].dev == sdev->dev && |
| 1396 | map->stripes[i].physical == dev_offset) { | ||
| 1395 | ret = scrub_stripe(sdev, map, i, chunk_offset, length); | 1397 | ret = scrub_stripe(sdev, map, i, chunk_offset, length); |
| 1396 | if (ret) | 1398 | if (ret) |
| 1397 | goto out; | 1399 | goto out; |
| @@ -1487,7 +1489,7 @@ int scrub_enumerate_chunks(struct scrub_dev *sdev, u64 start, u64 end) | |||
| 1487 | break; | 1489 | break; |
| 1488 | } | 1490 | } |
| 1489 | ret = scrub_chunk(sdev, chunk_tree, chunk_objectid, | 1491 | ret = scrub_chunk(sdev, chunk_tree, chunk_objectid, |
| 1490 | chunk_offset, length); | 1492 | chunk_offset, length, found_key.offset); |
| 1491 | btrfs_put_block_group(cache); | 1493 | btrfs_put_block_group(cache); |
| 1492 | if (ret) | 1494 | if (ret) |
| 1493 | break; | 1495 | break; |
