From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/4] btrfs: output more info for -ENOSPC caused transaction abort and other enhancement
Date: Tue, 19 Jul 2022 13:11:14 +0800 [thread overview]
Message-ID: <cover.1658207325.git.wqu@suse.com> (raw)
[Changelog]
v2:
- Add a new line to show the meaning of the metadata dump.
Previous output only includes the reserved bytes and size bytes,
but not showing which is which, thus still need to check the code
We have some internal reports of transaction abort with -ENOSPC.
Unfortunately it's really hard to debug, since we really got nothing
other than the error message for most cases.
Also we have helpers like __btrfs_dump_space_info(), it needs enospc_debug
mount option which only makes sense if the user can reproduce the bug
and retry with that mount option.
Considering ENOSPC should not happen for critical paths which failure
means transaction abort, we should dump all space info for debug purpose
if the transaction arbot is caused by -ENOSPC.
And since we're here, also enhance the output of
__btrfs_dump_space_info().
Now it should be more human readable, the exmaple would look like this:
BTRFS info (device dm-1: state A): dumpping space info:
BTRFS info (device dm-1: state A): space_info DATA has 1175552 free, is not full
BTRFS info (device dm-1: state A): total: 8388608
BTRFS info (device dm-1: state A): used: 7163904
BTRFS info (device dm-1: state A): pinned: 49152
BTRFS info (device dm-1: state A): reserved: 0
BTRFS info (device dm-1: state A): may_use: 0
BTRFS info (device dm-1: state A): read_only: 0
BTRFS info (device dm-1: state A): space_info META has 263798784 free, is not full
BTRFS info (device dm-1: state A): total: 268435456
BTRFS info (device dm-1: state A): used: 180224
BTRFS info (device dm-1: state A): pinned: 196608
BTRFS info (device dm-1: state A): reserved: 0
BTRFS info (device dm-1: state A): may_use: 4194304
BTRFS info (device dm-1: state A): read_only: 65536
BTRFS info (device dm-1: state A): space_info SYS has 8372224 free, is not full
BTRFS info (device dm-1: state A): total: 8388608
BTRFS info (device dm-1: state A): used: 16384
BTRFS info (device dm-1: state A): pinned: 0
BTRFS info (device dm-1: state A): reserved: 0
BTRFS info (device dm-1: state A): may_use: 0
BTRFS info (device dm-1: state A): read_only: 0
BTRFS info (device dm-1: state A): dumpping metadata reservation:
BTRFS info (device dm-1: state A): global: (3670016/3670016)
BTRFS info (device dm-1: state A): trans: (0/0)
BTRFS info (device dm-1: state A): chuunk: (0/0)
BTRFS info (device dm-1: state A): delayed_inode: (0/0)
BTRFS info (device dm-1: state A): delayed_refs: (524288/524288)
BTRFS: error (device dm-1: state A) in cleanup_transaction:1971: errno=-28 No space left
BTRFS info (device dm-1: state EA): forced readonly
Qu Wenruo (4):
btrfs: output human readable space info flag
btrfs: make __btrfs_dump_space_info() output better formatted
btrfs: make DUMP_BLOCK_RSV() to have better output
btrfs: dump all space infos if we abort transaction due to ENOSPC
fs/btrfs/ctree.h | 6 ++--
fs/btrfs/space-info.c | 72 +++++++++++++++++++++++++++++++++----------
fs/btrfs/space-info.h | 2 ++
fs/btrfs/super.c | 4 ++-
4 files changed, 64 insertions(+), 20 deletions(-)
--
2.37.0
next reply other threads:[~2022-07-19 5:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 5:11 Qu Wenruo [this message]
2022-07-19 5:11 ` [PATCH v2 1/4] btrfs: output human readable space info flag Qu Wenruo
2022-07-19 20:38 ` Sweet Tea Dorminy
2022-07-19 5:11 ` [PATCH v2 2/4] btrfs: make __btrfs_dump_space_info() output better formatted Qu Wenruo
2022-07-19 20:56 ` Sweet Tea Dorminy
2022-07-19 21:38 ` David Sterba
2022-07-19 22:58 ` Qu Wenruo
2022-07-26 18:13 ` David Sterba
2022-07-26 20:53 ` Boris Burkov
2022-07-26 21:39 ` David Sterba
2022-07-26 23:21 ` Boris Burkov
2022-07-27 1:21 ` Sweet Tea Dorminy
2022-07-27 1:44 ` Qu Wenruo
2022-07-27 15:09 ` Sweet Tea Dorminy
2022-07-19 5:11 ` [PATCH v2 3/4] btrfs: make DUMP_BLOCK_RSV() to have better output Qu Wenruo
2022-07-19 5:11 ` [PATCH v2 4/4] btrfs: dump all space infos if we abort transaction due to ENOSPC Qu Wenruo
2022-07-20 0:42 ` Sweet Tea Dorminy
2022-07-20 1:03 ` Qu Wenruo
2022-07-20 1:43 ` Sweet Tea Dorminy
2022-07-20 1:57 ` Qu Wenruo
2022-07-26 18:20 ` David Sterba
2022-07-26 18:38 ` Sweet Tea Dorminy
2022-08-24 15:53 ` [PATCH v2 0/4] btrfs: output more info for -ENOSPC caused transaction abort and other enhancement David Sterba
2022-08-25 3:04 ` Qu Wenruo
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.1658207325.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;
as well as URLs for NNTP newsgroup(s).