btrfs-progs: fix blindly goto failure for chunk-recover
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>
Wed, 28 May 2014 10:49:38 +0000 (18:49 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 22 Aug 2014 12:39:33 +0000 (14:39 +0200)
If the csum of one stripe is not able to judge the order of two
device extents, the stripe may happen to belong to the device extent
that is already kicked out as ordered.
Take this condition into consideration, don't report failure and
give more tries with the stripes following.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
chunk-recover.c

index bd37d6e8e5967332d80f8086fdf1ce6d77a73c6e..dfa7ff6327e3bc8c0f21e539aac948a68536fb14 100644 (file)
@@ -1922,10 +1922,9 @@ next_csum:
                        list_splice_init(&unordered, &chunk->dextents);
                        btrfs_release_path(&path);
                        return 0;
-               } else
-                       ret = 1;
+               }
 
-               goto fail_out;
+               goto next_stripe;
        }
 
        if (list_is_last(candidates.next, &candidates)) {