Blame SOURCES/0021-add-missing-units-to-examine.patch

c8f3db
From 227aeaa872d4898273cf87a4253898823d556c43 Mon Sep 17 00:00:00 2001
c8f3db
From: Corey Hickey <bugfood-c@fatooh.org>
c8f3db
Date: Mon, 11 Feb 2019 17:42:27 -0800
c8f3db
Subject: [RHEL7.7 PATCH 21/21] add missing units to --examine
c8f3db
c8f3db
Within the output of "mdadm --examine", there are three sizes reported
c8f3db
on adjacent lines. For example:
c8f3db
c8f3db
$ sudo mdadm --examine /dev/md3
c8f3db
[...]
c8f3db
 Avail Dev Size : 17580545024 (8383.06 GiB 9001.24 GB)
c8f3db
     Array Size : 17580417024 (16765.99 GiB 18002.35 GB)
c8f3db
  Used Dev Size : 11720278016 (5588.66 GiB 6000.78 GB)
c8f3db
[...]
c8f3db
c8f3db
This can be confusing, since the first and third line are in 512-byte
c8f3db
sectors, and the second is in KiB.
c8f3db
c8f3db
Add units to avoid ambiguity.
c8f3db
c8f3db
(I don't particularly like the "KiB" notation, but it is at least
c8f3db
unambiguous.)
c8f3db
c8f3db
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
c8f3db
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
c8f3db
---
c8f3db
 super1.c | 6 +++---
c8f3db
 1 file changed, 3 insertions(+), 3 deletions(-)
c8f3db
c8f3db
diff --git a/super1.c b/super1.c
c8f3db
index 636a286..b85dc20 100644
c8f3db
--- a/super1.c
c8f3db
+++ b/super1.c
c8f3db
@@ -360,7 +360,7 @@ static void examine_super1(struct supertype *st, char *homehost)
c8f3db
 	printf("     Raid Level : %s\n", c?c:"-unknown-");
c8f3db
 	printf("   Raid Devices : %d\n", __le32_to_cpu(sb->raid_disks));
c8f3db
 	printf("\n");
c8f3db
-	printf(" Avail Dev Size : %llu%s\n",
c8f3db
+	printf(" Avail Dev Size : %llu sectors%s\n",
c8f3db
 	       (unsigned long long)__le64_to_cpu(sb->data_size),
c8f3db
 	       human_size(__le64_to_cpu(sb->data_size)<<9));
c8f3db
 	if (__le32_to_cpu(sb->level) > 0) {
c8f3db
@@ -378,11 +378,11 @@ static void examine_super1(struct supertype *st, char *homehost)
c8f3db
 		if (ddsks) {
c8f3db
 			long long asize = __le64_to_cpu(sb->size);
c8f3db
 			asize = (asize << 9) * ddsks / ddsks_denom;
c8f3db
-			printf("     Array Size : %llu%s\n",
c8f3db
+			printf("     Array Size : %llu KiB%s\n",
c8f3db
 			       asize >> 10,  human_size(asize));
c8f3db
 		}
c8f3db
 		if (sb->size != sb->data_size)
c8f3db
-			printf("  Used Dev Size : %llu%s\n",
c8f3db
+			printf("  Used Dev Size : %llu sectors%s\n",
c8f3db
 			       (unsigned long long)__le64_to_cpu(sb->size),
c8f3db
 			       human_size(__le64_to_cpu(sb->size)<<9));
c8f3db
 	}
c8f3db
-- 
c8f3db
2.7.5
c8f3db