From: Qu Wenruo <wqu@suse.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: include root in error message when unlinking inode
Date: Fri, 23 May 2025 06:54:39 +0930 [thread overview]
Message-ID: <afbb6ba5-4d6e-4575-9b6b-8a7d337ae235@suse.com> (raw)
In-Reply-To: <a5d6ade388b810520d18ea92fce0d94c33e72768.1747926978.git.fdmanana@suse.com>
在 2025/5/23 00:49, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
>
> To help debugging include the root number in the error message, and since
> this is a critical error that implies a metadata inconsistency and results
> in a transaction abort change the log message level from "info" to
> "critical", which is a much better fit.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Looks good to me.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Just a small nitpick which can be addressed at merge time.> ---
> fs/btrfs/inode.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 7d27875600d6..161a19316dfa 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -4250,9 +4250,9 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
>
> ret = btrfs_del_inode_ref(trans, root, name, ino, dir_ino, &index);
> if (ret) {
> - btrfs_info(fs_info,
> - "failed to delete reference to %.*s, inode %llu parent %llu",
> - name->len, name->name, ino, dir_ino);
> + btrfs_crit(fs_info,
> + "failed to delete reference to %.*s, inode %llu parent %llu root %llu",
For most error messages involving both root and ino, we put root id
before inode.
E.g. checksum verification in inode.c, zstd.c, lzo.c etc.
Thanks,
Qu
> + name->len, name->name, ino, dir_ino, btrfs_root_id(root));
> btrfs_abort_transaction(trans, ret);
> goto err;
> }
prev parent reply other threads:[~2025-05-22 21:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 15:19 [PATCH] btrfs: include root in error message when unlinking inode fdmanana
2025-05-22 21:24 ` Qu Wenruo [this message]
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=afbb6ba5-4d6e-4575-9b6b-8a7d337ae235@suse.com \
--to=wqu@suse.com \
--cc=fdmanana@kernel.org \
--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