diff options
author | Filipe Manana | 2020-05-18 17:34:11 +0100 |
---|---|---|
committer | David Sterba | 2020-05-25 11:25:38 +0200 |
commit | 2e69a7a60d8d93b19f520bf4179614188a6cfdf5 (patch) | |
tree | df0b98451a7236147944104c21cf346189ff9320 /fs/btrfs | |
parent | 918cdf442326e5eaa808258e403c6a6e2dc23113 (diff) |
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: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 525bc5a250da..01e8451c47d5 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -1193,8 +1193,8 @@ out: if (block_group) { #ifdef CONFIG_BTRFS_DEBUG btrfs_err(root->fs_info, - "failed to write free space cache for block group %llu", - block_group->start); + "failed to write free space cache for block group %llu error %d", + block_group->start, ret); #endif } } @@ -1417,8 +1417,8 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans, if (ret) { #ifdef CONFIG_BTRFS_DEBUG btrfs_err(fs_info, - "failed to write free space cache for block group %llu", - block_group->start); + "failed to write free space cache for block group %llu error %d", + block_group->start, ret); #endif spin_lock(&block_group->lock); block_group->disk_cache_state = BTRFS_DC_ERROR; @@ -3997,8 +3997,8 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root, inode->i_size, true); #ifdef CONFIG_BTRFS_DEBUG btrfs_err(fs_info, - "failed to write free ino cache for root %llu", - root->root_key.objectid); + "failed to write free ino cache for root %llu error %d", + root->root_key.objectid, ret); #endif } |