Skip to content

Commit 912db40

Browse files
fdmananakdave
authored andcommitted
btrfs: convert log messages to error level in btrfs_replay_log()
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> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 4db8d56 commit 912db40

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/btrfs/disk-io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
19941994
int level = btrfs_super_log_root_level(disk_super);
19951995

19961996
if (unlikely(fs_devices->rw_devices == 0)) {
1997-
btrfs_warn(fs_info, "log replay required on RO media");
1997+
btrfs_err(fs_info, "log replay required on RO media");
19981998
return -EIO;
19991999
}
20002000

@@ -2008,9 +2008,9 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
20082008
check.owner_root = BTRFS_TREE_LOG_OBJECTID;
20092009
log_tree_root->node = read_tree_block(fs_info, bytenr, &check);
20102010
if (IS_ERR(log_tree_root->node)) {
2011-
btrfs_warn(fs_info, "failed to read log tree");
20122011
ret = PTR_ERR(log_tree_root->node);
20132012
log_tree_root->node = NULL;
2013+
btrfs_err(fs_info, "failed to read log tree with error: %d", ret);
20142014
btrfs_put_root(log_tree_root);
20152015
return ret;
20162016
}

0 commit comments

Comments
 (0)