btrfs: print available space for a block group when dumping a space info
authorFilipe Manana <fdmanana@suse.com>
Wed, 26 Jul 2023 15:57:01 +0000 (16:57 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:17 +0000 (14:52 +0200)
commite50b122b832bed9f36d459f19fd73d00658f5c1e
tree2554e01bc96a9f82c538cb5f14d59d1ae34f5915
parentb92e8f5472a28e311983f9f47e281e0adf56f10a
btrfs: print available space for a block group when dumping a space info

When dumping a space info, we iterate over all its block groups and then
print their size and the amounts of bytes used, reserved, pinned, etc.
When debugging -ENOSPC problems it's also useful to know how much space
is available (free), so calculate that and print it as well.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c