Message ID | 20200518163411.18660-1-fdmanana@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] Btrfs: include error on messages about failure to write space/inode caches | expand |
On Mon, May 18, 2020 at 05:34:11PM +0100, fdmanana@kernel.org wrote: > From: Filipe Manana <fdmanana@suse.com> > > 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> 1 and 2 added to misc-next, thanks. As the 2nd patch fixes a problem introduced in this dev cycle it's ok push it as a regression fix. But as we're at rc6 I'd prefer to postpone it for the merge window time, unless it's really annoying and hinders testing.
On Tue, May 19, 2020 at 2:07 PM David Sterba <dsterba@suse.cz> wrote: > > On Mon, May 18, 2020 at 05:34:11PM +0100, fdmanana@kernel.org wrote: > > From: Filipe Manana <fdmanana@suse.com> > > > > 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> > > 1 and 2 added to misc-next, thanks. > > As the 2nd patch fixes a problem introduced in this dev cycle it's ok > push it as a regression fix. But as we're at rc6 I'd prefer to postpone > it for the merge window time, unless it's really annoying and hinders > testing. Agreed. I consider it a very minor thing. Thanks.
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 3c353a337b91..3f63deb9f188 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -1193,8 +1193,8 @@ static int __btrfs_wait_cache_io(struct btrfs_root *root, 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 }