Skip to content

Commit b92e8f5

Browse files
fdmananakdave
authored andcommitted
btrfs: print block group super and delalloc bytes when dumping space info
When dumping a space info's block groups, also print the number of bytes used for super blocks and delalloc. This is often useful for debugging -ENOSPC problems. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 4d2024e commit b92e8f5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fs/btrfs/space-info.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,11 @@ void btrfs_dump_space_info(struct btrfs_fs_info *fs_info,
525525
list_for_each_entry(cache, &info->block_groups[index], list) {
526526
spin_lock(&cache->lock);
527527
btrfs_info(fs_info,
528-
"block group %llu has %llu bytes, %llu used %llu pinned %llu reserved %llu zone_unusable %s",
529-
cache->start, cache->length, cache->used, cache->pinned,
530-
cache->reserved, cache->zone_unusable,
531-
cache->ro ? "[readonly]" : "");
528+
"block group %llu has %llu bytes, %llu used %llu pinned %llu reserved %llu delalloc %llu super %llu zone_unusable %s",
529+
cache->start, cache->length, cache->used, cache->pinned,
530+
cache->reserved, cache->delalloc_bytes,
531+
cache->bytes_super, cache->zone_unusable,
532+
cache->ro ? "[readonly]" : "");
532533
spin_unlock(&cache->lock);
533534
btrfs_dump_free_space(cache, bytes);
534535
}

0 commit comments

Comments
 (0)