summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-12-05 11:06:55 +1100
committerNeilBrown <neilb@suse.de>2012-12-05 11:06:55 +1100
commit1d04e275703831d4883e5991d8685e86ec27041b (patch)
tree6cd3722a666fb1b81dc50b7abc698df8417d6ace /Assemble.c
parent262e3b7fe88d5bb7a29ace6a077bd3a2505820f1 (diff)
Assemble: Don't auto-assemble arrays which conflict with mdadm.conf
When auto-assembling we might find an array which appear in mdadm.conf. This can happen if the array (based on UUID) doesn't match what is in mdadm.conf. For consistency we should avoid auto-assembling such an array just as we avoid regular-assembling of the array. Reported-by: Ross Boylan <ross@biostat.ucsf.edu> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Assemble.c b/Assemble.c
index 9ef1bf0e..eeb5e4a1 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -385,6 +385,13 @@ static int select_devices(struct mddev_dev *devlist,
devname);
goto loop;
}
+ if (match && !ident_matches(match, content, tst,
+ c->homehost, c->update,
+ report_missmatch ? devname : NULL))
+ /* Array exists in mdadm.conf but some
+ * details don't match, so reject it
+ */
+ goto loop;
/* should be safe to try an exclusive open now, we
* have rejected anything that some other mdadm might