summaryrefslogtreecommitdiff
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-09 18:27:19 +1100
committerNeilBrown <neilb@suse.de>2011-03-09 18:27:19 +1100
commitbb7295f15e02d8cd8b52de14f40c1d7e10555cc9 (patch)
tree0bd1bc55baf98be3864b9e3ee5cbd052a55fac9d /super0.c
parent66ccd96ebc5dd5801c8bd0ba9fc69b2fcdd1aa22 (diff)
Fix chunksize defaulting.
the new code for defaulting chunksizes didn't work quite right - default was set to late in super1/super0/ddf - defaults would over-ride values of '0' imposed by some levels - default value wasn't applied to size properly. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/super0.c b/super0.c
index 832072d8..4f7110d0 100644
--- a/super0.c
+++ b/super0.c
@@ -1113,12 +1113,12 @@ static int validate_geometry0(struct supertype *st, int level,
fprintf(stderr, Name ": 0.90 metadata supports at most 2 terrabytes per device\n");
return 0;
}
+ if (chunk && *chunk == UnSet)
+ *chunk = DEFAULT_CHUNK;
+
if (!subdev)
return 1;
- if (chunk && (*chunk == 0 || *chunk == UnSet))
- *chunk = DEFAULT_CHUNK;
-
fd = open(subdev, O_RDONLY|O_EXCL, 0);
if (fd < 0) {
if (verbose)