summaryrefslogtreecommitdiffstats
path: root/super-gpt.c
diff options
context:
space:
mode:
authorCzarnowska, Anna <anna.czarnowska@intel.com>2011-02-22 01:25:07 +0100
committerNeilBrown <neilb@suse.de>2011-02-22 01:25:07 +0100
commitc21e737ba12903ecf3a4f42a119807d328f3f8c9 (patch)
tree029b740e595b49559b34c4923af0d1f8508a6bd5 /super-gpt.c
parentfix: memory leak in Create (diff)
downloadmdadm-c21e737ba12903ecf3a4f42a119807d328f3f8c9.tar.xz
mdadm-c21e737ba12903ecf3a4f42a119807d328f3f8c9.zip
set default chunk in validate_geometry
When chunk size is not set from command line we need to guess it depending on metadata given on command line or found on listed devices. Validate_geometry sets the default for it's metadata if chunk is not set. For external metadata chunk is set only when creating in a container. For imsm validate_geometry_imsm_orom is responsible for finding default chunk depending on container metadata loaded. Container will already know which controller it is attached to, and have this controllers orom available. do_default_chunk indicates that we need to find default chunk and if validate_geometry fails for some metadata it tells us to reset chunk that may have been set. Current solution would set default chunk correctly for imsm only if container device was given on command line. With the list of devices chunk was always set to 512. Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-gpt.c')
-rw-r--r--super-gpt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-gpt.c b/super-gpt.c
index f60a6714..6f852aa1 100644
--- a/super-gpt.c
+++ b/super-gpt.c
@@ -193,7 +193,7 @@ static struct supertype *match_metadata_desc(char *arg)
#ifndef MDASSEMBLE
static int validate_geometry(struct supertype *st, int level,
int layout, int raiddisks,
- int chunk, unsigned long long size,
+ int *chunk, unsigned long long size,
char *subdev, unsigned long long *freesize,
int verbose)
{