From: Filipe Manana <fdmanana@kernel.org>
To: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Improve error reporting in lookup_inline_extent_backref
Date: Fri, 22 Apr 2022 11:11:22 +0100 [thread overview]
Message-ID: <YmJ/SlbQJJrS1ars@debian9.Home> (raw)
In-Reply-To: <20220420145203.GE1513@twin.jikos.cz>
On Wed, Apr 20, 2022 at 04:52:04PM +0200, David Sterba wrote:
> On Wed, Apr 20, 2022 at 02:54:00PM +0300, Nikolay Borisov wrote:
> > When iterating the backrefs in an extent item if the ptr to the
> > 'current' backref record goes beyond the extent item a warning is
> > generated and -ENOENT is returned. However what's more appropriate to
> > debug such cases would be to return EUCLEAN and also print the in-memory
> > state of the offending leaf.
How does printing only the leaf helps debugging anything?
You get the leaf dumped, but how do you know what you should be looking for?
Which key in the leaf, and for which inline backref are we searching for?
Dumping the leaf alone is not really useful, unless we also mention what we
are searching for...
So this should print as well:
1) The key, which tells us which key to look at, the extent's bytenr, type
and size or owner;
2) The type of reference we are looking for, stored in the variable 'want';
3) The values of the variables 'root_objectid', 'parent' and 'offset'.
These are used to search for the backreference we want, once we find
one with the type we want.
Thanks.
>
> Agreed, EUCLEAN makese sense. Added to misc-next, thanks.
next prev parent reply other threads:[~2022-04-22 10:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 11:54 [PATCH] btrfs: Improve error reporting in lookup_inline_extent_backref Nikolay Borisov
2022-04-20 14:52 ` David Sterba
2022-04-22 10:11 ` Filipe Manana [this message]
2022-04-20 15:54 ` David Sterba
2022-04-20 16:01 ` Nikolay Borisov
2022-04-21 6:40 ` kernel test robot
2022-04-21 6:41 ` kernel test robot
2022-04-21 6:43 ` kernel test robot
2022-04-21 6:44 ` kernel test robot
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=YmJ/SlbQJJrS1ars@debian9.Home \
--to=fdmanana@kernel.org \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.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