diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-07-17 05:45:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-17 05:45:29 -0400 |
commit | b5e4111f027c4be85dbe97e090530d03c55c4cf4 (patch) | |
tree | 11e0a37cb59314f4e9a7b2810124a4a7a33140e5 /fs/btrfs/scrub.c | |
parent | 72d5305dcb3637913c2c37e847a4de9028e49244 (diff) | |
parent | 9de8033f1bbcce5ed23fe5da9ca1a5060207f7ed (diff) |
Merge branch 'locking/urgent' into locking/core, before applying larger changes and to refresh the branch with fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index ac80188eec88..b6d198f5181e 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -2725,11 +2725,8 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, | |||
2725 | dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent); | 2725 | dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent); |
2726 | length = btrfs_dev_extent_length(l, dev_extent); | 2726 | length = btrfs_dev_extent_length(l, dev_extent); |
2727 | 2727 | ||
2728 | if (found_key.offset + length <= start) { | 2728 | if (found_key.offset + length <= start) |
2729 | key.offset = found_key.offset + length; | 2729 | goto skip; |
2730 | btrfs_release_path(path); | ||
2731 | continue; | ||
2732 | } | ||
2733 | 2730 | ||
2734 | chunk_tree = btrfs_dev_extent_chunk_tree(l, dev_extent); | 2731 | chunk_tree = btrfs_dev_extent_chunk_tree(l, dev_extent); |
2735 | chunk_objectid = btrfs_dev_extent_chunk_objectid(l, dev_extent); | 2732 | chunk_objectid = btrfs_dev_extent_chunk_objectid(l, dev_extent); |
@@ -2740,10 +2737,12 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, | |||
2740 | * the chunk from going away while we scrub it | 2737 | * the chunk from going away while we scrub it |
2741 | */ | 2738 | */ |
2742 | cache = btrfs_lookup_block_group(fs_info, chunk_offset); | 2739 | cache = btrfs_lookup_block_group(fs_info, chunk_offset); |
2743 | if (!cache) { | 2740 | |
2744 | ret = -ENOENT; | 2741 | /* some chunks are removed but not committed to disk yet, |
2745 | break; | 2742 | * continue scrubbing */ |
2746 | } | 2743 | if (!cache) |
2744 | goto skip; | ||
2745 | |||
2747 | dev_replace->cursor_right = found_key.offset + length; | 2746 | dev_replace->cursor_right = found_key.offset + length; |
2748 | dev_replace->cursor_left = found_key.offset; | 2747 | dev_replace->cursor_left = found_key.offset; |
2749 | dev_replace->item_needs_writeback = 1; | 2748 | dev_replace->item_needs_writeback = 1; |
@@ -2802,7 +2801,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, | |||
2802 | 2801 | ||
2803 | dev_replace->cursor_left = dev_replace->cursor_right; | 2802 | dev_replace->cursor_left = dev_replace->cursor_right; |
2804 | dev_replace->item_needs_writeback = 1; | 2803 | dev_replace->item_needs_writeback = 1; |
2805 | 2804 | skip: | |
2806 | key.offset = found_key.offset + length; | 2805 | key.offset = found_key.offset + length; |
2807 | btrfs_release_path(path); | 2806 | btrfs_release_path(path); |
2808 | } | 2807 | } |