Dan Williams: Examine: don't count containers as spares
Martin F. Krafft
madduck at alioth.debian.org
Tue Oct 27 19:21:47 UTC 2009
Module: mdadm
Branch: upstream
Commit: ed57a7e8ba06237dc6f4a8f581d12353158ce798
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=ed57a7e8ba06237dc6f4a8f581d12353158ce798
Author: Dan Williams <dan.j.williams at intel.com>
Date: Tue Sep 15 11:35:28 2009 -0700
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 <dan.j.williams at intel.com>
---
Examine.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
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<<MD_DISK_SYNC)))
+ if (!st->loaded_container &&
+ !(ap->info.disk.state & (1<<MD_DISK_SYNC)))
ap->spares++;
d = dl_strdup(devlist->devname);
dl_add(ap->devs, d);
More information about the pkg-mdadm-commits
mailing list