linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Subject: [PATCH 2/2] btrfs-progs: fix blindly goto failure for chunk-recover
Date: Wed, 28 May 2014 18:49:38 +0800	[thread overview]
Message-ID: <1401274178-4523-2-git-send-email-guihc.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1401274178-4523-1-git-send-email-guihc.fnst@cn.fujitsu.com>

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(-)

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)) {
-- 
1.8.1.4


      reply	other threads:[~2014-05-28 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 10:49 [PATCH 1/2] btrfs-progs: fix uninitialized number count in chunk-recover Gui Hecheng
2014-05-28 10:49 ` Gui Hecheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401274178-4523-2-git-send-email-guihc.fnst@cn.fujitsu.com \
    --to=guihc.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).