]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: analyse_change needs to set new_size even if nothing much is happening.
authorNeilBrown <neilb@suse.de>
Mon, 24 Jun 2013 03:06:32 +0000 (13:06 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Jun 2013 03:06:32 +0000 (13:06 +1000)
This means it will be set for a "--data-offset" only reshape so that
case doesn't complain that the array is getting smaller.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 7bfb3ceb7916303c77ea423c03d4767f10a9b792..37f3667797f27f02b7a35a28a5270089d8a241ff 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -1412,6 +1412,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
        /* So we have a restripe operation, we need to calculate the number
         * of blocks per reshape operation.
         */
+       re->new_size = info->component_size * re->before.data_disks;
        if (info->new_chunk == 0)
                info->new_chunk = info->array.chunk_size;
        if (re->after.data_disks == re->before.data_disks &&