Commit 2e69a7a6 authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba

btrfs: include error on messages about failure to write space/inode caches

Currently the error messages logged when we fail to write a free space
cache or an inode cache are not very useful as they don't mention what
was the error. So include the error number in the messages.
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 918cdf44
...@@ -1193,8 +1193,8 @@ static int __btrfs_wait_cache_io(struct btrfs_root *root, ...@@ -1193,8 +1193,8 @@ static int __btrfs_wait_cache_io(struct btrfs_root *root,
if (block_group) { if (block_group) {
#ifdef CONFIG_BTRFS_DEBUG #ifdef CONFIG_BTRFS_DEBUG
btrfs_err(root->fs_info, btrfs_err(root->fs_info,
"failed to write free space cache for block group %llu", "failed to write free space cache for block group %llu error %d",
block_group->start); block_group->start, ret);
#endif #endif
} }
} }
...@@ -1417,8 +1417,8 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans, ...@@ -1417,8 +1417,8 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
if (ret) { if (ret) {
#ifdef CONFIG_BTRFS_DEBUG #ifdef CONFIG_BTRFS_DEBUG
btrfs_err(fs_info, btrfs_err(fs_info,
"failed to write free space cache for block group %llu", "failed to write free space cache for block group %llu error %d",
block_group->start); block_group->start, ret);
#endif #endif
spin_lock(&block_group->lock); spin_lock(&block_group->lock);
block_group->disk_cache_state = BTRFS_DC_ERROR; block_group->disk_cache_state = BTRFS_DC_ERROR;
...@@ -3997,8 +3997,8 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root, ...@@ -3997,8 +3997,8 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root,
inode->i_size, true); inode->i_size, true);
#ifdef CONFIG_BTRFS_DEBUG #ifdef CONFIG_BTRFS_DEBUG
btrfs_err(fs_info, btrfs_err(fs_info,
"failed to write free ino cache for root %llu", "failed to write free ino cache for root %llu error %d",
root->root_key.objectid); root->root_key.objectid, ret);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment