* [PATCH] btrfs: convert log messages to error level in btrfs_replay_log()
@ 2026-02-10 10:33 fdmanana
2026-02-10 19:03 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: fdmanana @ 2026-02-10 10:33 UTC (permalink / raw)
To: linux-btrfs
From: Filipe Manana <fdmanana@suse.com>
We are logging messages as warnings but they should really have an error
level instead, as if the respective conditions are met the mount will
fail. So convert them to error level and also log the error code returned
by read_tree_block().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
fs/btrfs/disk-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ccf540646b60..99ce7c1ca53a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2004,7 +2004,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
int level = btrfs_super_log_root_level(disk_super);
if (unlikely(fs_devices->rw_devices == 0)) {
- btrfs_warn(fs_info, "log replay required on RO media");
+ btrfs_err(fs_info, "log replay required on RO media");
return -EIO;
}
@@ -2018,9 +2018,9 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
check.owner_root = BTRFS_TREE_LOG_OBJECTID;
log_tree_root->node = read_tree_block(fs_info, bytenr, &check);
if (IS_ERR(log_tree_root->node)) {
- btrfs_warn(fs_info, "failed to read log tree");
ret = PTR_ERR(log_tree_root->node);
log_tree_root->node = NULL;
+ btrfs_err(fs_info, "failed to read log tree with error: %d", ret);
btrfs_put_root(log_tree_root);
return ret;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: convert log messages to error level in btrfs_replay_log()
2026-02-10 10:33 [PATCH] btrfs: convert log messages to error level in btrfs_replay_log() fdmanana
@ 2026-02-10 19:03 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2026-02-10 19:03 UTC (permalink / raw)
To: fdmanana; +Cc: linux-btrfs
On Tue, Feb 10, 2026 at 10:33:27AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> We are logging messages as warnings but they should really have an error
> level instead, as if the respective conditions are met the mount will
> fail. So convert them to error level and also log the error code returned
> by read_tree_block().
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-10 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 10:33 [PATCH] btrfs: convert log messages to error level in btrfs_replay_log() fdmanana
2026-02-10 19:03 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox