Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Filipe Manana and committed by
David Sterba
912db406 4db8d56c

+2 -2
+2 -2
fs/btrfs/disk-io.c
··· 1994 1994 int level = btrfs_super_log_root_level(disk_super); 1995 1995 1996 1996 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"); 1998 1998 return -EIO; 1999 1999 } 2000 2000 ··· 2008 2008 check.owner_root = BTRFS_TREE_LOG_OBJECTID; 2009 2009 log_tree_root->node = read_tree_block(fs_info, bytenr, &check); 2010 2010 if (IS_ERR(log_tree_root->node)) { 2011 - btrfs_warn(fs_info, "failed to read log tree"); 2012 2011 ret = PTR_ERR(log_tree_root->node); 2013 2012 log_tree_root->node = NULL; 2013 + btrfs_err(fs_info, "failed to read log tree with error: %d", ret); 2014 2014 btrfs_put_root(log_tree_root); 2015 2015 return ret; 2016 2016 }