From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 5/5] btrfs: improve error message in setup_items_for_insert
Date: Tue, 1 Sep 2020 17:40:01 +0300 [thread overview]
Message-ID: <20200901144001.4265-6-nborisov@suse.com> (raw)
In-Reply-To: <20200901144001.4265-1-nborisov@suse.com>
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);
+ btrfs_print_leaf(leaf);
BUG();
}
/*
--
2.17.1
next prev parent reply other threads:[~2020-09-01 14:41 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 ` Nikolay Borisov [this message]
2020-09-01 19:23 ` [PATCH 5/5] btrfs: improve error message in setup_items_for_insert Josef Bacik
2020-09-10 16:14 ` David Sterba
2020-09-11 14:50 ` David Sterba
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=20200901144001.4265-6-nborisov@suse.com \
--to=nborisov@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