Skip to content

Commit 2e69a7a

Browse files
fdmananakdave
authored andcommitted
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 <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 918cdf4 commit 2e69a7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fs/btrfs/free-space-cache.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,8 +1193,8 @@ static int __btrfs_wait_cache_io(struct btrfs_root *root,
11931193
if (block_group) {
11941194
#ifdef CONFIG_BTRFS_DEBUG
11951195
btrfs_err(root->fs_info,
1196-
"failed to write free space cache for block group %llu",
1197-
block_group->start);
1196+
"failed to write free space cache for block group %llu error %d",
1197+
block_group->start, ret);
11981198
#endif
11991199
}
12001200
}
@@ -1417,8 +1417,8 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
14171417
if (ret) {
14181418
#ifdef CONFIG_BTRFS_DEBUG
14191419
btrfs_err(fs_info,
1420-
"failed to write free space cache for block group %llu",
1421-
block_group->start);
1420+
"failed to write free space cache for block group %llu error %d",
1421+
block_group->start, ret);
14221422
#endif
14231423
spin_lock(&block_group->lock);
14241424
block_group->disk_cache_state = BTRFS_DC_ERROR;
@@ -3997,8 +3997,8 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root,
39973997
inode->i_size, true);
39983998
#ifdef CONFIG_BTRFS_DEBUG
39993999
btrfs_err(fs_info,
4000-
"failed to write free ino cache for root %llu",
4001-
root->root_key.objectid);
4000+
"failed to write free ino cache for root %llu error %d",
4001+
root->root_key.objectid, ret);
40024002
#endif
40034003
}
40044004

0 commit comments

Comments
 (0)