[3/3] btrfs-progs: mkfs: Fix inaccurate mixed information
diff mbox

Message ID 5f474fe3bd4d26284ec1e01afa6355e523d7477e.1444740703.git.zhaolei@cn.fujitsu.com
State New
Headers show

Commit Message

Zhaolei Oct. 13, 2015, 12:52 p.m. UTC
In current code, with a "BIG VOLUME" /dev/vdd2:
 # ./mkfs.btrfs -f -M /dev/vdd2
 SMALL VOLUME: forcing mixed metadata/data groups
 ...

This patch changed above output to:
 Using mixed metadata/data groups

And the "SMALL VOLUME" output only when we exactly using
SMALL VOLUME.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 mkfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/mkfs.c b/mkfs.c
index 29cab13..0064a78 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1505,7 +1505,10 @@  int main(int ac, char **av)
 		ret = 0;
 	}
 
-	if (!large_device_cnt || mixed) {
+	if (mixed) {
+		if (verbose)
+			printf("Using mixed metadata/data groups\n");
+	} else if (!large_device_cnt) {
 		if (verbose)
 			printf("SMALL VOLUME: forcing mixed metadata/data groups\n");
 		mixed = 1;