]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow.c: change size to be unsigned and use '0' in case of 'no change'
authorLukasz Dorau <lukasz.dorau@intel.com>
Fri, 10 Aug 2012 14:06:34 +0000 (16:06 +0200)
committerNeilBrown <neilb@suse.de>
Sun, 12 Aug 2012 22:07:01 +0000 (08:07 +1000)
The 'size' has been changed to be unsigned recently.
Analogous changes should be made to reshape_super().
'0' should be used in case of 'no change' now.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 527d1c84889147fef77190a8c1a3cdc6d1ecdfd4..4c78020be24ab4042dc97c74c8a01485ce0d0607 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -642,8 +642,8 @@ static void wait_reshape(struct mdinfo *sra)
        close(fd);
 }
 
-static int reshape_super(struct supertype *st, long long size, int level,
-                        int layout, int chunksize, int raid_disks,
+static int reshape_super(struct supertype *st, unsigned long long size,
+                        int level, int layout, int chunksize, int raid_disks,
                         int delta_disks, char *backup_file, char *dev,
                         int direction, int verbose)
 {
@@ -1999,7 +1999,7 @@ size_change_error:
                /* Impose these changes on a single array.  First
                 * check that the metadata is OK with the change. */
 
-               if (reshape_super(st, -1, info.new_level,
+               if (reshape_super(st, 0, info.new_level,
                                  info.new_layout, info.new_chunk,
                                  info.array.raid_disks, info.delta_disks,
                                  c->backup_file, devname, APPLY_METADATA_CHANGES,
@@ -2684,10 +2684,10 @@ int reshape_container(char *container, char *devname,
        int last_devnum = -1;
 
        /* component_size is not meaningful for a container,
-        * so pass '-1' meaning 'no change'
+        * so pass '0' meaning 'no change'
         */
        if (!restart &&
-           reshape_super(st, -1, info->new_level,
+           reshape_super(st, 0, info->new_level,
                          info->new_layout, info->new_chunk,
                          info->array.raid_disks, info->delta_disks,
                          backup_file, devname, APPLY_METADATA_CHANGES,