diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-08-25 19:14:04 -0700 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-08-30 10:49:41 +1000 |
commit | 660260d027bed08fad2393998e1ca8cb67e1b573 (patch) | |
tree | 16894d57c71623929156f6451f5cc6e6be33bf2c /super-intel.c | |
parent | 1b17b4e4ff57a4f7dcbc87c5a03f2d9c87f6cb2f (diff) |
imsm: fix max disks per array
Validate geometry is incorrectly looking at max disks support which is
irrelevant for md/mdadm. ->dpa (disks per array) is how many disks the
orom will allow per volume.
Also cleanup an unnecessary ->orom check, is_raid_level_supported()
already does the right thing in the !orom case.
Cc: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/super-intel.c b/super-intel.c index ddf4de90..a921cbc7 100644 --- a/super-intel.c +++ b/super-intel.c @@ -4933,28 +4933,19 @@ static int imsm_default_chunk(const struct imsm_orom *orom) } #define pr_vrb(fmt, arg...) (void) (verbose && fprintf(stderr, Name fmt, ##arg)) -/* - * validate volume parameters with OROM/EFI capabilities - */ static int validate_geometry_imsm_orom(struct intel_super *super, int level, int layout, int raiddisks, int *chunk, int verbose) { -#if DEBUG - verbose = 1; -#endif - /* validate container capabilities */ - if (super->orom && raiddisks > super->orom->tds) { - if (verbose) - fprintf(stderr, Name ": %d exceeds maximum number of" - " platform supported disks: %d\n", - raiddisks, super->orom->tds); + /* check/set platform and metadata limits/defaults */ + if (super->orom && raiddisks > super->orom->dpa) { + pr_vrb(": platform supports a maximum of %d disks per array\n", + super->orom->dpa); return 0; } /* capabilities of OROM tested - copied from validate_geometry_imsm_volume */ - if (super->orom && (!is_raid_level_supported(super->orom, level, - raiddisks))) { + if (!is_raid_level_supported(super->orom, level, raiddisks)) { pr_vrb(": platform does not support raid%d with %d disk%s\n", level, raiddisks, raiddisks > 1 ? "s" : ""); return 0; |