Skip to content

Commit e38fdb7

Browse files
josefbacikkdave
authored andcommitted
btrfs: print the block rsv type when we fail our reservation
To help with debugging, print the type of the block rsv when we fail to use our target block rsv in btrfs_use_block_rsv. This now produces: [ 544.672035] BTRFS: block rsv 1 returned -28 which is still cryptic without consulting the enum in block-rsv.h but I guess it's better than nothing. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> [ add note from Nikolay ] Signed-off-by: David Sterba <dsterba@suse.com>
1 parent a1fbc67 commit e38fdb7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/btrfs/block-rsv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ struct btrfs_block_rsv *btrfs_use_block_rsv(struct btrfs_trans_handle *trans,
511511
/*DEFAULT_RATELIMIT_BURST*/ 1);
512512
if (__ratelimit(&_rs))
513513
WARN(1, KERN_DEBUG
514-
"BTRFS: block rsv returned %d\n", ret);
514+
"BTRFS: block rsv %d returned %d\n",
515+
block_rsv->type, ret);
515516
}
516517
try_reserve:
517518
ret = btrfs_reserve_metadata_bytes(root, block_rsv, blocksize,

0 commit comments

Comments
 (0)