From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 5/5] btrfs: improve error message in setup_items_for_insert
Date: Fri, 11 Sep 2020 16:50:12 +0200 [thread overview]
Message-ID: <20200911145012.GS18399@twin.jikos.cz> (raw)
In-Reply-To: <20200901144001.4265-6-nborisov@suse.com>
On Tue, Sep 01, 2020 at 05:40:01PM +0300, Nikolay Borisov wrote:
> While at it also print the leaf content after the error.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/ctree.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index bb89c0954ca1..2c3f78cc6aa2 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -4799,9 +4799,9 @@ void setup_items_for_insert(struct btrfs_root *root, struct btrfs_path *path,
> unsigned int old_data = btrfs_item_end_nr(leaf, slot);
>
> if (old_data < data_end) {
> - btrfs_print_leaf(leaf);
> - btrfs_crit(fs_info, "slot %d old_data %d data_end %d",
> + btrfs_crit(fs_info, "item's (slot %d) data offset (%d) beyond data end of leaf (%d)",
> slot, old_data, data_end);
I've changed it to
"item at slot %d with data offset %u beyond data end of leaf %u"
as we don't use the ( ) elsewhere. The formats were mismatching old_data
and data_end, so they're now %u.
> + btrfs_print_leaf(leaf);
The leaf is dumped as before, so the changelog got updated too.
next prev parent reply other threads:[~2020-09-11 15:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 14:39 [PATCH 0/5] Improve setup_items_for_insert Nikolay Borisov
2020-09-01 14:39 ` [PATCH 1/5] btrfs: Re-arrange statements in setup_items_for_insert Nikolay Borisov
2020-09-01 19:13 ` Josef Bacik
2020-09-01 14:39 ` [PATCH 2/5] btrfs: Eliminate total_size parameter from setup_items_for_insert Nikolay Borisov
2020-09-01 19:18 ` Josef Bacik
2020-09-01 14:39 ` [PATCH 3/5] btrfs: Sink total_data parameter in setup_items_for_insert Nikolay Borisov
2020-09-01 19:21 ` Josef Bacik
2020-09-01 14:40 ` [PATCH 4/5] btrfs: Add kerneldoc for setup_items_for_insert Nikolay Borisov
2020-09-01 19:22 ` Josef Bacik
2020-09-01 14:40 ` [PATCH 5/5] btrfs: improve error message in setup_items_for_insert Nikolay Borisov
2020-09-01 19:23 ` Josef Bacik
2020-09-10 16:14 ` David Sterba
2020-09-11 14:50 ` David Sterba [this message]
2020-09-02 10:39 ` [PATCH 0/5] Improve setup_items_for_insert Johannes Thumshirn
2020-09-10 16:16 ` 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=20200911145012.GS18399@twin.jikos.cz \
--to=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