From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 4/5] btrfs: disk-io: Show the timing of corrupted tree block explicitly
Date: Thu, 17 Jan 2019 15:48:54 +0800 [thread overview]
Message-ID: <20190117074855.24818-5-wqu@suse.com> (raw)
In-Reply-To: <20190117074855.24818-1-wqu@suse.com>
Just add one extra line to show when the corruption is detected.
Currently only read time detection is possible.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
fs/btrfs/disk-io.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 659bab9de03b..bc2379cb2091 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -652,11 +652,14 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
*/
if (found_level == 0 && btrfs_check_leaf_full(fs_info, eb)) {
set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
+ btrfs_err(fs_info, "read time tree block corruption detected");
ret = -EIO;
}
- if (found_level > 0 && btrfs_check_node(fs_info, eb))
+ if (found_level > 0 && btrfs_check_node(fs_info, eb)) {
+ btrfs_err(fs_info, "read time tree block corruption detected");
ret = -EIO;
+ }
if (!ret)
set_extent_buffer_uptodate(eb);
--
2.20.1
next prev parent reply other threads:[~2019-01-17 7:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 7:48 [PATCH 0/5] btrfs: Enhancement to tree block validation Qu Wenruo
2019-01-17 7:48 ` [PATCH 1/5] btrfs: Always output error message when key/level verification fails Qu Wenruo
2019-01-17 7:48 ` [PATCH 2/5] btrfs: extent_io: Kill the forward declaration of flush_write_bio() Qu Wenruo
2019-01-17 7:50 ` Nikolay Borisov
2019-01-17 7:48 ` [PATCH 3/5] btrfs: extent_io: Kill the BUG_ON() in flush_write_bio() Qu Wenruo
2019-01-17 8:22 ` Nikolay Borisov
2019-01-17 8:28 ` Qu Wenruo
2019-01-17 8:52 ` Nikolay Borisov
2019-01-17 7:48 ` Qu Wenruo [this message]
2019-01-17 8:42 ` [PATCH 4/5] btrfs: disk-io: Show the timing of corrupted tree block explicitly Nikolay Borisov
2019-01-17 7:48 ` [PATCH 5/5] btrfs: Do mandatory tree block check before submitting bio Qu Wenruo
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=20190117074855.24818-5-wqu@suse.com \
--to=wqu@suse.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).