From ed57a7e8ba06237dc6f4a8f581d12353158ce798 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 15 Sep 2009 11:35:28 -0700 Subject: [PATCH] Examine: don't count containers as spares mdadm -Ebs will include containers in the scanned device list. Examine() falsely thinks they are spares when MD_DISK_SYNC is not set. This could be fixed by forcing all formats to set this flag for container devices, but this flag is currently used by imsm to identify free-floating spares. Signed-off-by: Dan Williams --- Examine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Examine.c b/Examine.c index d4904bc..7fbd4ae 100644 --- a/Examine.c +++ b/Examine.c @@ -118,7 +118,8 @@ int Examine(mddev_dev_t devlist, int brief, int export, int scan, st->ss->getinfo_super(st, &ap->info); } else st->ss->getinfo_super(st, &ap->info); - if (!(ap->info.disk.state & (1<loaded_container && + !(ap->info.disk.state & (1<spares++; d = dl_strdup(devlist->devname); dl_add(ap->devs, d);