diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-09-16 05:58:40 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-09-16 05:58:40 +0200 |
commit | 3e372e5a7299d1f969c02b4ecf10b7df0998926d (patch) | |
tree | f87798cf3a81126647711b2068bc1595ec13fc42 | |
parent | imsm: fix up spare handling holdover in update_create_array (diff) | |
download | mdadm-3e372e5a7299d1f969c02b4ecf10b7df0998926d.tar.xz mdadm-3e372e5a7299d1f969c02b4ecf10b7df0998926d.zip |
imsm: fix up compare_super_imsm() to match family_num for populated mpb's
This allows spares to be associated with any family while not allowing
disks from different families to be assembled.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | super-intel.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c index b4bcb283..f1b24357 100644 --- a/super-intel.c +++ b/super-intel.c @@ -793,6 +793,15 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst) return 3; } + /* if 'first' is a spare promote it to a populated mpb with sec's + * family number + */ + if (first->anchor->num_raid_devs == 0 && + sec->anchor->num_raid_devs > 0) { + first->anchor->num_raid_devs = sec->anchor->num_raid_devs; + first->anchor->family_num = sec->anchor->family_num; + } + return 0; } |