]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm : FIX: Assemble dirty array when reshape is in progress
authorAdam Kwolek <adam.kwolek@intel.com>
Thu, 10 Mar 2011 00:41:33 +0000 (11:41 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 00:41:33 +0000 (11:41 +1100)
During reshape for dirty volumes reshape_progress has to be calculated
also.  To keep the same logic for array creation:
  not setting info->resync_start = MaxSector when first condition is
  true,
  resync_start is initialized by MaxSector to allow proper array
  initialization.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index cd409e92cadbc19e936ae05c4128f6ff29913d8b..931b7fe436d02d93c6d5c0364aaf721d515c0f39 100644 (file)
@@ -1820,10 +1820,12 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
        info->recovery_start = MaxSector;
 
        info->reshape_progress = 0;
+       info->resync_start = MaxSector;
        if (map_to_analyse->map_state == IMSM_T_STATE_UNINITIALIZED ||
            dev->vol.dirty) {
                info->resync_start = 0;
-       } else if (dev->vol.migr_state) {
+       }
+       if (dev->vol.migr_state) {
                switch (migr_type(dev)) {
                case MIGR_REPAIR:
                case MIGR_INIT: {
@@ -1868,8 +1870,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
                        /* we are not dirty, so... */
                        info->resync_start = MaxSector;
                }
-       } else
-               info->resync_start = MaxSector;
+       }
 
        strncpy(info->name, (char *) dev->volume, MAX_RAID_SERIAL_LEN);
        info->name[MAX_RAID_SERIAL_LEN] = 0;