diff options
author | NeilBrown <neilb@suse.de> | 2012-10-30 14:28:25 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-11-20 12:07:30 +1100 |
commit | cb8f6859d1f0c18bdac10353e45eb14825b24cd2 (patch) | |
tree | 7e5982b1eeb650befe65e8aebdcc6a54c4bb53c1 | |
parent | 156044805c762f87577366e36b18c4c80bfe40ba (diff) |
IMSM - allow assembling any imsm array even without OROM.
It is important to check for compatibility with 'platform' or
Option ROM when creating or changing and array. However there is no
real need when simply assembling the array.
On some systems there are situations where the platform information is
not available. e.g. on some UEFI systems, UEFI is not available
during 'kdump' handling. This makes it impossible to assemble
an IMSM array to receive the dump.
So remove the requirements that the platform be visible to assemble
an IMSM array.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | Assemble.c | 2 | ||||
-rw-r--r-- | Incremental.c | 3 | ||||
-rw-r--r-- | super-intel.c | 14 | ||||
-rw-r--r-- | util.c | 6 |
4 files changed, 12 insertions, 13 deletions
@@ -1219,6 +1219,8 @@ try_again: mddev ? mddev : "further assembly"); content = &info; + if (st) + st->ignore_hw_compat = 1; num_devs = select_devices(devlist, ident, &st, &content, c, inargv, auto_assem); if (num_devs < 0) diff --git a/Incremental.c b/Incremental.c index 4c889b5f..bc23a885 100644 --- a/Incremental.c +++ b/Incremental.c @@ -127,6 +127,8 @@ int Incremental(char *devname, 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); @@ -185,6 +187,7 @@ int Incremental(char *devname, struct context *c, st, c->verbose); goto out; } + st->ignore_hw_compat = 1; if (st->ss->compare_super == NULL || st->ss->load_super(st, dfd, NULL)) { if (c->verbose >= 0) diff --git a/super-intel.c b/super-intel.c index 452fae4c..202b83fc 100644 --- a/super-intel.c +++ b/super-intel.c @@ -3069,10 +3069,11 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst) } /* in platform dependent environment test if the disks * use the same Intel hba + * If not on Intel hba at all, allow anything. */ if (!check_env("IMSM_NO_PLATFORM")) { - if (!first->hba || !sec->hba || - (first->hba->type != sec->hba->type)) { + if (first->hba && sec->hba && + first->hba->type != sec->hba->type) { fprintf(stderr, "HBAs of devices does not match %s != %s\n", first->hba ? get_sys_dev_type(first->hba->type) : NULL, @@ -4326,7 +4327,6 @@ static int get_super_block(struct intel_super **super_list, int devnum, char *de struct intel_super*s = NULL; char nm[32]; int dfd = -1; - int rv; int err = 0; int retry; @@ -4343,13 +4343,7 @@ static int get_super_block(struct intel_super **super_list, int devnum, char *de goto error; } - rv = find_intel_hba_capability(dfd, s, devname); - /* no orom/efi or non-intel hba of the disk */ - if (rv != 0) { - err = 4; - goto error; - } - + find_intel_hba_capability(dfd, s, devname); err = load_and_parse_mpb(dfd, s, NULL, keep_fd); /* retry the load if we might have raced against mdmon */ @@ -559,8 +559,8 @@ int check_raid(int fd, char *name) char *level; struct supertype *st = guess_super(fd); - if (!st) return 0; - st->ignore_hw_compat = 1; + if (!st) + return 0; st->ss->load_super(st, fd, name); /* Looks like a raid array .. */ pr_err("%s appears to be part of a raid array:\n", @@ -1077,6 +1077,7 @@ struct supertype *dup_super(struct supertype *orig) st->ss = orig->ss; st->max_devs = orig->max_devs; st->minor_version = orig->minor_version; + st->ignore_hw_compat = orig->ignore_hw_compat; st->sb = NULL; st->info = NULL; return st; @@ -1124,7 +1125,6 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type) rv = superlist[bestsuper]->load_super(st, fd, NULL); if (rv == 0) { superlist[bestsuper]->free_super(st); - st->ignore_hw_compat = 0; return st; } } |