Skip to contentSkip to conversation

btrfs: add comma delimiter for zone_unusable to space_info dump

PATCH In review Johannes Thumshirn 2 participants 2 messages Jun 5, 2025 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: add comma delimiter for zone_unusable to space_info dump

From: Johannes Thumshirn <[email protected]>

On a space_info dump all values but 'zone_unusable' are delimited by a comma.

Add the missing comma between 'readonly' and 'zone_unusable' to be consistent and make parsing easier.

---
 fs/btrfs/space-info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/space-info.c +1 -1
index 517916004f21..a2da9b4ab3ac 100644
@@ -607,7 +607,7 @@ static void __btrfs_dump_space_info(const struct btrfs_fs_info *fs_info,
 		   (s64)(info->total_bytes - btrfs_space_info_used(info, true)),
 		   info->full ? "" : "not ");
 	btrfs_info(fs_info,
-"space_info total=%llu, used=%llu, pinned=%llu, reserved=%llu, may_use=%llu, readonly=%llu zone_unusable=%llu",
+"space_info total=%llu, used=%llu, pinned=%llu, reserved=%llu, may_use=%llu, readonly=%llu, zone_unusable=%llu",
 		info->total_bytes, info->bytes_used, info->bytes_pinned,
 		info->bytes_reserved, info->bytes_may_use,
 		info->bytes_readonly, info->bytes_zone_unusable);
Signature · 1 line
2.49.0
#1 lore raw
Quoted 7 lines · Johannes Thumshirn

From: Johannes Thumshirn <[email protected]>

On a space_info dump all values but 'zone_unusable' are delimited by a comma.

Add the missing comma between 'readonly' and 'zone_unusable' to be consistent and make parsing easier.

So this makes it consistent with the rest of the line but is otherwise inconsistent with the style of values printed elsewhere, ie. without the "=" between name and value.

But it seems it's been quite inconsistent everywhere. The only place where the style is unified is tracepoints. I'm not sure if we should do the same in the normal syslog messges, either with the space as delimiter or with "=". In both cases the "," can be dropped though.