Skip to contentSkip to conversation

Btrfs-progs: make btrfs df report profiles for mixed block groups

PATCH New Ilya Dryomov 1 participant 1 message Oct 8, 2011 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs-progs: make btrfs df report profiles for mixed block groups

Profiles other than SINGLE for mixed chunks might sound a bit strange, but there is nothing in the filesystem that prevents a crazy user from doing it. So make "btrfs fi df" report them properly.

---
 btrfs_cmds.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
btrfs_cmds.c +2 -2
index 32f6b25..0d7d4da 100644
@@ -967,9 +967,9 @@ int do_df_filesystem(int nargs, char **argv)
 
 		if (flags & BTRFS_BLOCK_GROUP_DATA) {
 			if (flags & BTRFS_BLOCK_GROUP_METADATA) {
-				snprintf(description, 15, "%s",
+				snprintf(description, 14, "%s",
 					 "Data+Metadata");
-				written += 14;
+				written += 13;
 			} else {
 				snprintf(description, 5, "%s", "Data");
 				written += 4;
Signature · 1 line
1.7.5.4