From 8d2359c8d9419be10e3af75f426e984df3d2e020 Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Thu, 6 Mar 2014 13:54:00 +0800 Subject: Btrfs-progs: fsck: handle case that we can not lookup extent info Previously, --init-extent-tree works just because btrfs_lookup_extent_info() blindly return 0, and this make it work if there are not any *FULL BACKREF* mode in broken filesystem. It is just a coincidence that --init-extent-tree option works, let's do it in the right way firstly. For now, we have not supported to rebuild extent tree if there are any *FULL BACKREF* mode which means if there are snapshots with broken filesystem, avoid using --init-extent-tree option now. Signed-off-by: Wang Shilong Signed-off-by: David Sterba Signed-off-by: Chris Mason --- extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extent-tree.c') diff --git a/extent-tree.c b/extent-tree.c index 7860d1d9..79794573 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -1560,7 +1560,7 @@ again: *flags = extent_flags; out: btrfs_free_path(path); - return 0; + return ret; } int btrfs_set_block_flags(struct btrfs_trans_handle *trans, -- cgit v1.2.3