From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: [PATCH 3/4] btrfs-progs: check: Continue check even csum error is found
Date: Tue, 27 Feb 2018 17:12:58 +0800 [thread overview]
Message-ID: <20180227091259.10877-4-wqu@suse.com> (raw)
In-Reply-To: <20180227091259.10877-1-wqu@suse.com>
Since data csum is not a fatal error compared to fs/extent trees,
continue check.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
check/main.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/check/main.c b/check/main.c
index 15b3c402c9f5..22a78273be15 100644
--- a/check/main.c
+++ b/check/main.c
@@ -9847,11 +9847,13 @@ int cmd_check(int argc, char **argv)
fprintf(stderr, "checking csums\n");
ret = check_csums(root);
- err |= !!ret;
- if (ret) {
+ /*
+ * Data csum error is not fatal, and it may indicates more serious
+ * corruption, continue checking.
+ */
+ if (ret)
error("errors found in csum tree");
- goto out;
- }
+ err |= !!ret;
fprintf(stderr, "checking root refs\n");
/* For low memory mode, check_fs_roots_v2 handles root refs */
--
2.16.2
next prev parent reply other threads:[~2018-02-27 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 9:12 [PATCH 0/4] btrfs check --check-data-csum enhancement for Qu Wenruo
2018-02-27 9:12 ` [PATCH 1/4] btrfs-progs: check: Check data csum for all copies Qu Wenruo
2018-02-27 10:01 ` Su Yue
2018-02-27 10:31 ` Qu Wenruo
2018-02-27 11:09 ` Nikolay Borisov
2018-02-27 11:21 ` Qu Wenruo
2018-02-28 1:10 ` Su Yue
2018-02-27 9:12 ` [PATCH 2/4] btrfs-progs: check: Fix data csum check return value Qu Wenruo
2018-02-27 9:12 ` Qu Wenruo [this message]
2018-02-27 9:12 ` [PATCH 4/4] btrfs-progs: check: Distingusih csum checking output for --check-data-csum Qu Wenruo
2018-05-07 18:34 ` [PATCH 0/4] btrfs check --check-data-csum enhancement for David Sterba
2018-05-28 12:20 ` Qu Wenruo
2018-05-28 13:14 ` David Sterba
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=20180227091259.10877-4-wqu@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.cz \
--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).