diff options
author | NeilBrown <neilb@suse.com> | 2015-07-29 06:38:37 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-08-03 07:42:16 +0200 |
commit | 7eee461e91df702d8f588955b03e5bbb07e1f88d (patch) | |
tree | 01523e41c628ccb93234a786e5e190b29ef4d6ad /Incremental.c | |
parent | Release mdadm-3.3.3 (diff) | |
download | mdadm-7eee461e91df702d8f588955b03e5bbb07e1f88d.tar.xz mdadm-7eee461e91df702d8f588955b03e5bbb07e1f88d.zip |
Assemble: don't assemble IMSM array without OROM.
If someone has an IMSM array, and disables RAID in the BIOS
and uses the devices for some other purpose, then they really don't
want mdadm to start syncing the array.
So don't assemble if OROM doesn't confirm it is OK.
There can still be problems for crash-dump not being able to find
the OROM. Some explicit work-around might be needed for that
rather than a more general workaround that can corrupt data.
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Incremental.c b/Incremental.c index c766ea04..88576197 100644 --- a/Incremental.c +++ b/Incremental.c @@ -130,8 +130,6 @@ int Incremental(struct mddev_dev *devlist, struct context *c, if (must_be_container(dfd)) { if (!st) st = super_by_fd(dfd, NULL); - if (st) - st->ignore_hw_compat = 1; if (st && st->ss->load_container) rv = st->ss->load_container(st, dfd, NULL); @@ -204,7 +202,8 @@ int Incremental(struct mddev_dev *devlist, struct context *c, NULL, c->verbose); goto out; } - st->ignore_hw_compat = 1; + st->ignore_hw_compat = 0; + if (st->ss->compare_super == NULL || st->ss->load_super(st, dfd, NULL)) { if (c->verbose >= 0) @@ -1123,6 +1122,7 @@ static int partition_try_spare(char *devname, int *dfdp, struct dev_policy *pol, if (st2 == NULL || st2->ss->load_super(st2, fd, NULL) < 0) goto next; + st2->ignore_hw_compat = 0; if (!st) { /* Check domain policy again, this time referring to metadata */ @@ -1349,8 +1349,7 @@ restart: struct supertype *st = super_by_fd(mdfd, NULL); int ret = 0; struct map_ent *map = NULL; - if (st) - st->ignore_hw_compat = 1; + if (st && st->ss->load_container) ret = st->ss->load_container(st, mdfd, NULL); close(mdfd); |