diff options
author | NeilBrown <neilb@suse.de> | 2012-08-13 00:00:18 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-08-13 00:00:18 +0200 |
commit | 0a8b92a6f630e8f517ed570a2bfeabba74478fa5 (patch) | |
tree | 91e56a01de746fd4aa360d50540b9518d68c71ad /Build.c | |
parent | Repair mode for raid6 (diff) | |
download | mdadm-0a8b92a6f630e8f517ed570a2bfeabba74478fa5.tar.xz mdadm-0a8b92a6f630e8f517ed570a2bfeabba74478fa5.zip |
Fix default size calculations that were recently broken.
commit d04f65f48c93e7e57cc3c1d70dd07d094dece717
Change the values for "max size" from -1 to 1.
Messed up 's->size' - leaving it as '1' (MAX_SIZE) in some cases and
causing the array reshape to fail.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Build.c')
-rw-r--r-- | Build.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -124,7 +124,9 @@ int Build(char *mddev, struct mddev_dev *devlist, if (vers >= 9000) { mdu_array_info_t array; array.level = s->level; - array.size = s->size == MAX_SIZE ? 0 : s->size; + if (s->size == MAX_SIZE) + s->size = 0; + array.size = s->size; array.nr_disks = s->raiddisks; array.raid_disks = s->raiddisks; array.md_minor = 0; |