From: Hugo Mills <hugo@carfax.org.uk>
To: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Cc: Nikolay Borisov <nborisov@suse.com>,
Su Yue <suy.fnst@cn.fujitsu.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Add more details while checking tree block
Date: Fri, 22 Jun 2018 15:40:30 +0000 [thread overview]
Message-ID: <20180622154030.GG28972@carfax.org.uk> (raw)
In-Reply-To: <06086fd3-f28b-5cc7-f3c6-3fca659b2fa0@mendix.com>
[-- Attachment #1: Type: text/plain, Size: 2761 bytes --]
On Fri, Jun 22, 2018 at 05:26:02PM +0200, Hans van Kranenburg wrote:
> On 06/22/2018 01:48 PM, Nikolay Borisov wrote:
> >
> >
> > On 22.06.2018 04:52, Su Yue wrote:
> >> For easier debug, print eb->start if level is invalid.
> >> Also make print clear if bytenr found is not expected.
> >>
> >> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
> >> ---
> >> fs/btrfs/disk-io.c | 8 ++++----
> >> 1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> >> index c3504b4d281b..a90dab84f41b 100644
> >> --- a/fs/btrfs/disk-io.c
> >> +++ b/fs/btrfs/disk-io.c
> >> @@ -615,8 +615,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
> >>
> >> found_start = btrfs_header_bytenr(eb);
> >> if (found_start != eb->start) {
> >> - btrfs_err_rl(fs_info, "bad tree block start %llu %llu",
> >> - found_start, eb->start);
> >> + btrfs_err_rl(fs_info, "bad tree block start want %llu have %llu",
> >
> > nit: I'd rather have the want/have in brackets (want %llu have% llu)
>
> From a user support point of view, this text should really be improved.
> There are a few places where 'want' and 'have' are reported in error
> strings, and it's totally unclear what they mean.
>
> Intuitively I'd say when checking a csum, the "want" would be what's on
> disk now, since you want that to be correct, and the "have" would be
> what you have calculated, but it's actually the other way round, or
> wasn't it? Or was it?
>
> Every time someone pastes such a message when we help on IRC for
> example, there's confusion, and I have to look up the source again,
> because I always forget.
>
> What about (%llu stored on disk, %llu calculated now) or something similar?
Yes, definitely this. I experience the same confusion as Hans, and
I think a lot of other people do, too. I usually read "want" and
"have" the wrong way round, so more clarity would be really helpful.
Hugo.
> >> + eb->start, found_start);
> >> ret = -EIO;
> >> goto err;
> >> }
> >> @@ -628,8 +628,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
> >> }
> >> found_level = btrfs_header_level(eb);
> >> if (found_level >= BTRFS_MAX_LEVEL) {
> >> - btrfs_err(fs_info, "bad tree block level %d",
> >> - (int)btrfs_header_level(eb));
> >> + btrfs_err(fs_info, "bad tree block level %d on %llu",
> >> + (int)btrfs_header_level(eb), eb->start);
> >> ret = -EIO;
> >> goto err;
> >> }
> >>
>
--
Hugo Mills | "There's a Martian war machine outside -- they want
hugo@... carfax.org.uk | to talk to you about a cure for the common cold."
http://carfax.org.uk/ |
PGP: E2AB1DE4 | Stephen Franklin, Babylon 5
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2018-06-22 15:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 1:52 [PATCH] btrfs: Add more details while checking tree block Su Yue
2018-06-22 11:44 ` David Sterba
2018-06-22 11:48 ` Nikolay Borisov
[not found] ` <CABnRu560BS0NDcuEEfexR-vkqTOMpUkAB0bWYSM8G2957yTm6w@mail.gmail.com>
2018-06-22 15:17 ` Fwd: " Su Yue
2018-06-22 15:26 ` Hans van Kranenburg
2018-06-22 15:40 ` Hugo Mills [this message]
2018-06-22 16:15 ` Su Yue
2018-06-22 16:17 ` Su Yue
2018-06-22 16:25 ` Nikolay Borisov
2018-06-22 16:29 ` Hans van Kranenburg
2018-06-22 18:26 ` Noah Massey
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=20180622154030.GG28972@carfax.org.uk \
--to=hugo@carfax.org.uk \
--cc=hans.van.kranenburg@mendix.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=suy.fnst@cn.fujitsu.com \
/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