From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: add error reports for possible run_one_delayed_ref()
Date: Mon, 26 Dec 2022 09:00:38 +0800 [thread overview]
Message-ID: <cover.1672016104.git.wqu@suse.com> (raw)
There is a bug report that one can cause error in run_one_delayed_ref()
and make the fs RO.
But there is only two lines of dmesg:
BTRFS: error (device nvme0n1p3: state A) in btrfs_run_delayed_refs:2147: errno=-5 IO failure
BTRFS info (device nvme0n1p3: state EA): forced readonly
Which is not really helpful.
This patch will add two error reports which should help us to debug:
- Add the missing level check errors in validate_extent_buffer()
Failed level checks didn't cause any error message, which is very
different compared to the other checks.
- Add error report for failed run_one_delayed_ref()
This will include extra info for each node.
The remaining branches are either calling btrfs_abort_transaction(),
which should provide function and line number, or have extra error
message like alloc_reserved_extent(), or should trigger error messages
from validate_extent_buffer() when failed, like btrfs_insert_empty_item().
Thus this two patches should cover most of the error cases.
Qu Wenruo (2):
btrfs: add extra error message for tree block level mismatch
btrfs: always report error for run_one_delayed_ref()
fs/btrfs/disk-io.c | 4 ++++
fs/btrfs/extent-tree.c | 7 +++++--
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.39.0
next reply other threads:[~2022-12-26 1:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 1:00 Qu Wenruo [this message]
2022-12-26 1:00 ` [PATCH 1/2] btrfs: add extra error message for tree block level mismatch Qu Wenruo
2023-01-03 8:36 ` Anand Jain
2022-12-26 1:00 ` [PATCH 2/2] btrfs: always report error for run_one_delayed_ref() Qu Wenruo
2023-01-02 16:45 ` David Sterba
2023-01-03 8:48 ` Anand Jain
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=cover.1672016104.git.wqu@suse.com \
--to=wqu@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