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