Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287886
b: refs/heads/master
c: 859acaf
h: refs/heads/master
v: v3
  • Loading branch information
Arne Jansen authored and David Sterba committed Feb 15, 2012
1 parent 0cc3b8f commit 4f6d686
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cac13e41bf5b99ffc426bd28dfd2248df1dfa67
refs/heads/master: 859acaf1a29bbacf6256f1159210c8d6df992b33
8 changes: 5 additions & 3 deletions trunk/fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,8 @@ static noinline_for_stack int scrub_stripe(struct scrub_dev *sdev,
}

static noinline_for_stack int scrub_chunk(struct scrub_dev *sdev,
u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 length)
u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 length,
u64 dev_offset)
{
struct btrfs_mapping_tree *map_tree =
&sdev->dev->dev_root->fs_info->mapping_tree;
Expand All @@ -1391,7 +1392,8 @@ static noinline_for_stack int scrub_chunk(struct scrub_dev *sdev,
goto out;

for (i = 0; i < map->num_stripes; ++i) {
if (map->stripes[i].dev == sdev->dev) {
if (map->stripes[i].dev == sdev->dev &&
map->stripes[i].physical == dev_offset) {
ret = scrub_stripe(sdev, map, i, chunk_offset, length);
if (ret)
goto out;
Expand Down Expand Up @@ -1487,7 +1489,7 @@ int scrub_enumerate_chunks(struct scrub_dev *sdev, u64 start, u64 end)
break;
}
ret = scrub_chunk(sdev, chunk_tree, chunk_objectid,
chunk_offset, length);
chunk_offset, length, found_key.offset);
btrfs_put_block_group(cache);
if (ret)
break;
Expand Down

0 comments on commit 4f6d686

Please sign in to comment.