[2/2] btrfs-progs: fix blindly goto failure for chunk-recover
diff mbox

Message ID 1401274178-4523-2-git-send-email-guihc.fnst@cn.fujitsu.com
State Accepted
Delegated to: David Sterba
Headers show

Commit Message

Gui Hecheng May 28, 2014, 10:49 a.m. UTC
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>
---
 chunk-recover.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch
diff mbox

diff --git a/chunk-recover.c b/chunk-recover.c
index 924b2f6..5a68d2e 100644
--- a/chunk-recover.c
+++ b/chunk-recover.c
@@ -1943,10 +1943,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)) {