diff options
author | NeilBrown <neilb@suse.de> | 2012-08-13 08:00:18 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-08-13 08:00:18 +1000 |
commit | 0a8b92a6f630e8f517ed570a2bfeabba74478fa5 (patch) | |
tree | 91e56a01de746fd4aa360d50540b9518d68c71ad /Grow.c | |
parent | f2e29ad6910041161309ffe9d0d2462b942a7b9f (diff) |
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 'Grow.c')
-rw-r--r-- | Grow.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1716,7 +1716,9 @@ int Grow_reshape(char *devname, int fd, st->update_tail = &st->updates; } - array.size = s->size == MAX_SIZE ? 0 : s->size; + if (s->size == MAX_SIZE) + s->size = 0; + array.size = s->size; if ((unsigned)array.size != s->size) { /* got truncated to 32bit, write to * component_size instead |