Blame SOURCES/0011-Remove-Spare-drives-line-from-details-for-external-m.patch

7140c6
From 8d69bf147ec77447c5d45c17bed7dc017808cc44 Mon Sep 17 00:00:00 2001
7140c6
From: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
7140c6
Date: Fri, 18 Jun 2021 15:53:31 +0200
7140c6
Subject: [PATCH 11/15] Remove Spare drives line from details for external
7140c6
 metadata
7140c6
7140c6
Arrays with external metadata do not have spare disks directly
7140c6
assigned to volumes; spare disks belong to containers and are
7140c6
moved to arrays when the array is degraded/reshaping.
7140c6
Thus, the display of zero spare disks in volume details is
7140c6
incorrect and can be confusing.
7140c6
7140c6
Signed-off-by: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
7140c6
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
7140c6
---
7140c6
 Detail.c | 3 ++-
7140c6
 1 file changed, 2 insertions(+), 1 deletion(-)
7140c6
7140c6
diff --git a/Detail.c b/Detail.c
7140c6
index cd26fb0..ad56344 100644
7140c6
--- a/Detail.c
7140c6
+++ b/Detail.c
7140c6
@@ -548,7 +548,8 @@ int Detail(char *dev, struct context *c)
7140c6
 			       array.working_disks);
7140c6
 		if (array.raid_disks) {
7140c6
 			printf("    Failed Devices : %d\n", array.failed_disks);
7140c6
-			printf("     Spare Devices : %d\n", array.spare_disks);
7140c6
+			if (!external)
7140c6
+				printf("     Spare Devices : %d\n", array.spare_disks);
7140c6
 		}
7140c6
 		printf("\n");
7140c6
 		if (array.level == 5) {
7140c6
-- 
7140c6
2.7.5
7140c6