]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
btrfs: change warning messages to error level in open_ctree()
authorFilipe Manana <fdmanana@suse.com>
Mon, 9 Feb 2026 15:27:14 +0000 (15:27 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 26 Feb 2026 14:03:26 +0000 (15:03 +0100)
Failure to read the fs root results in a mount error, but we log a warning
message. Same goes for checking the UUID tree, an error results in a mount
failure but we log a warning message. Change the level of the logged
messages from warning to error.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c

index 13e400046c8776531091ae299876a55e8bffa315..de8ce9c588feace46b207aff9739e1fd0239cef5 100644 (file)
@@ -3642,7 +3642,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
        fs_info->fs_root = btrfs_get_fs_root(fs_info, BTRFS_FS_TREE_OBJECTID, true);
        if (IS_ERR(fs_info->fs_root)) {
                ret = PTR_ERR(fs_info->fs_root);
-               btrfs_warn(fs_info, "failed to read fs tree: %d", ret);
+               btrfs_err(fs_info, "failed to read fs tree: %d", ret);
                fs_info->fs_root = NULL;
                goto fail_qgroup;
        }
@@ -3663,8 +3663,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
                btrfs_info(fs_info, "checking UUID tree");
                ret = btrfs_check_uuid_tree(fs_info);
                if (ret) {
-                       btrfs_warn(fs_info,
-                               "failed to check the UUID tree: %d", ret);
+                       btrfs_err(fs_info, "failed to check the UUID tree: %d", ret);
                        close_ctree(fs_info);
                        return ret;
                }