Skip to content

Commit 4d2024e

Browse files
fdmananakdave
authored andcommitted
btrfs: print target number of bytes when dumping free space
When dumping free space, with btrfs_dump_free_space(), we pass a bytes argument in order to count how many free space entries in the block group have a size greater than or equal to that number of bytes. We then print how many suitable entries we found, but we don't print the target number of bytes, we just say "bytes". Change the message to actually print the number of bytes, which makes debugging -ENOSPC issues a bit easier. Also sligthly change the odd grammar and terminology: the sentence is ending with 'is', which doesn't make sense, and the term 'blocks' is confusing as we are referring to free space entries within the block group's free space cache. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 1928895 commit 4d2024e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/btrfs/free-space-cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,8 @@ void btrfs_dump_free_space(struct btrfs_block_group *block_group,
29432943
btrfs_info(fs_info, "block group has cluster?: %s",
29442944
list_empty(&block_group->cluster_list) ? "no" : "yes");
29452945
btrfs_info(fs_info,
2946-
"%d blocks of free space at or bigger than bytes is", count);
2946+
"%d free space entries at or bigger than %llu bytes",
2947+
count, bytes);
29472948
}
29482949

29492950
void btrfs_init_free_space_ctl(struct btrfs_block_group *block_group,

0 commit comments

Comments
 (0)