1. 31 Jan, 2011 4 commits
    • NeilBrown's avatar
      md: don't abort checking spares as soon as one cannot be added. · 50da0840
      NeilBrown authored
      As spares can be added manually before a reshape starts, we need to
      find them all to mark some of them as in_sync.
      
      Previously we would abort looking for spares when we found an
      unallocated spare what could not be added to the array (implying there
      was no room for new spares).  However already-added spares could be
      later in the list, so we need to keep searching.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      50da0840
    • NeilBrown's avatar
      md: fix the test for finding spares in raid5_start_reshape. · 469518a3
      NeilBrown authored
      As spares can be added to the array before the reshape is started,
      we need to find and count them when checking there are enough.
      The array could have been degraded, so we need to check all devices,
      no just those out side of the range of devices in the array before
      the reshape.
      
      So instead of checking the index, check the In_sync flag as that
      reliably tells if the device is a spare or this purpose.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      469518a3
    • NeilBrown's avatar
      md: simplify some 'if' conditionals in raid5_start_reshape. · 87a8dec9
      NeilBrown authored
      There are two consecutive 'if' statements.
      
       if (mddev->delta_disks >= 0)
            ....
       if (mddev->delta_disks > 0)
      
      The code in the second is equally valid if delta_disks == 0, and these
      two statements are the only place that 'added_devices' is used.
      
      So make them a single if statement, make added_devices a local
      variable, and re-indent it all.
      
      No functional change.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      87a8dec9
    • NeilBrown's avatar
      md: revert change to raid_disks on failure. · de171cb9
      NeilBrown authored
      If we try to update_raid_disks and it fails, we should put
      'delta_disks' back to zero.  This is important because some code,
      such as slot_store, assumes that delta_disks has been validated.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      de171cb9
  2. 28 Jan, 2011 8 commits
  3. 27 Jan, 2011 14 commits
  4. 26 Jan, 2011 14 commits