summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-01-12 21:38:32 +0800
committerChris Mason <clm@fb.com>2014-01-28 13:20:32 -0800
commit7c76edb77c23db673a83793686b4a53e2eec4de4 (patch)
treeb8c2d6bec1a6e5c87ec44dfb6b87ea956f167603 /fs/btrfs
parent28e5dd8f35202ff56b2eb1725ac77f0d0fcb4758 (diff)
downloadlinux-7c76edb77c23db673a83793686b4a53e2eec4de4.tar.gz
linux-7c76edb77c23db673a83793686b4a53e2eec4de4.tar.bz2
linux-7c76edb77c23db673a83793686b4a53e2eec4de4.zip
Btrfs: fix missing skinny metadata check in scrub_stripe()
Check if we support skinny metadata firstly and fix to use right type to search. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/scrub.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 7806e2c47f89..e0677e42d66d 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2373,8 +2373,11 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
scrub_blocked_if_needed(fs_info);
}
+ if (btrfs_fs_incompat(fs_info, SKINNY_METADATA))
+ key.type = BTRFS_METADATA_ITEM_KEY;
+ else
+ key.type = BTRFS_EXTENT_ITEM_KEY;
key.objectid = logical;
- key.type = BTRFS_EXTENT_ITEM_KEY;
key.offset = (u64)-1;
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);