All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
To: jes@trained-monkey.org
Cc: linux-raid@vger.kernel.org,
	Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
Subject: [PATCH 2/3] Remove Spare drives line from details for external metadata
Date: Fri, 18 Jun 2021 15:53:31 +0200	[thread overview]
Message-ID: <20210618135332.11293-2-oleksandr.shchirskyi@linux.intel.com> (raw)
In-Reply-To: <20210618135332.11293-1-oleksandr.shchirskyi@linux.intel.com>

Arrays with external metadata do not have spare disks directly
assigned to volumes; spare disks belong to containers and are
moved to arrays when the array is degraded/reshaping.
Thus, the display of zero spare disks in volume details is
incorrect and can be confusing.

Signed-off-by: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
---
 Detail.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Detail.c b/Detail.c
index cd26fb0f..ad56344f 100644
--- a/Detail.c
+++ b/Detail.c
@@ -548,7 +548,8 @@ int Detail(char *dev, struct context *c)
 			       array.working_disks);
 		if (array.raid_disks) {
 			printf("    Failed Devices : %d\n", array.failed_disks);
-			printf("     Spare Devices : %d\n", array.spare_disks);
+			if (!external)
+				printf("     Spare Devices : %d\n", array.spare_disks);
 		}
 		printf("\n");
 		if (array.level == 5) {
-- 
2.27.0


  reply	other threads:[~2021-06-18 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 13:53 [PATCH 1/3] imsm: correct offset for 4k disks in --examine output Oleksandr Shchirskyi
2021-06-18 13:53 ` Oleksandr Shchirskyi [this message]
2021-06-18 13:53 ` [PATCH 3/3] Don't associate spares with other arrays during RAID Examine Oleksandr Shchirskyi
2021-07-16 14:26 ` [PATCH 1/3] imsm: correct offset for 4k disks in --examine output Jes Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210618135332.11293-2-oleksandr.shchirskyi@linux.intel.com \
    --to=oleksandr.shchirskyi@linux.intel.com \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.