From: Johannes Thumshirn <jthumshirn@suse.de>
To: Qu Wenruo <wqu@suse.de>, linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: Re: [PATCH v2 4/5] btrfs: disk-io: Show the timing of corrupted tree block explicitly
Date: Thu, 17 Jan 2019 15:08:17 +0100 [thread overview]
Message-ID: <43381c61-3132-9ce6-4acd-2f1972345552@suse.de> (raw)
In-Reply-To: <fc3cc57e-b0cf-9e4c-7e5e-1e1b87782460@suse.de>
On 17/01/2019 14:42, Qu Wenruo wrote:
>
> To show when the error happens.
>
> This patch only handles the read time error, thus we have two same error
> message.
>
> But the next patch will introduce new write time validation check, thus
> we need to distinguish then by the extra message.
OK, so if we really want the same message printed for all read time
errors, how about this:
if (found_level == 0 && btrfs_check_leaf_full(fs_info, eb)) {
set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
ret = -EIO;
}
if (found_level > 0 && btrfs_check_node(fs_info, eb))
ret = -EIO;
+ if (ret == -EIO)
+ btrfs_err(fs_info,
+ "read time tree block corruption detected");
+ else if (!ret)
- if (!ret)
set_extent_buffer_uptodate(eb);
So we really only have one message printed and not duplicating the prints.
Byte,
Johannes
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
next prev parent reply other threads:[~2019-01-17 14:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 10:15 [PATCH v2 0/5] btrfs: Enhancement to tree block validation Qu Wenruo
2019-01-17 10:15 ` [PATCH v2 1/5] btrfs: Always output error message when key/level verification fails Qu Wenruo
2019-01-17 13:14 ` Johannes Thumshirn
2019-01-17 13:25 ` Qu Wenruo
2019-01-17 10:15 ` [PATCH v2 2/5] btrfs: extent_io: Kill the forward declaration of flush_write_bio() Qu Wenruo
2019-01-17 13:22 ` Johannes Thumshirn
2019-01-17 10:15 ` [PATCH v2 3/5] btrfs: extent_io: Kill the BUG_ON() in flush_write_bio() Qu Wenruo
2019-01-17 10:15 ` [PATCH v2 4/5] btrfs: disk-io: Show the timing of corrupted tree block explicitly Qu Wenruo
2019-01-17 13:36 ` Johannes Thumshirn
2019-01-17 13:42 ` Qu Wenruo
2019-01-17 14:08 ` Johannes Thumshirn [this message]
2019-01-17 14:29 ` Qu Wenruo
2019-01-17 10:15 ` [PATCH v2 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=43381c61-3132-9ce6-4acd-2f1972345552@suse.de \
--to=jthumshirn@suse.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=wqu@suse.de \
/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).