1. 30 12月, 2009 5 次提交
    • N
      md: allow a resync that is waiting for other resync to complete, to be aborted. · 404e4b43
      NeilBrown 提交于
      If two arrays share a device, then they will not both resync at the
      same time.  One will wait for the other to complete.
      While waiting, the MD_RECOVERY_INTR flag is not checked so a device
      failure, which would make the resync pointless, does not cause the
      resync to abort, so the failed device cannot be removed (as it cannot
      be remove while a resync is happening).
      
      So add a test for MD_RECOVERY_INTR.
      Reported-by: NBrett Russ <bruss@netezza.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      404e4b43
    • N
      md: remove unnecessary code from do_md_run · 7fb9dadc
      NeilBrown 提交于
      Since commit dfc70645,
      ->hot_remove_disks has not removed non-failed devices from
      an array until recovery is no longer possible.
      So the code in do_md_run to get around the fact that
      md_check_recovery (which calls ->hot_remove_disks) would
      remove partially-in-sync devices is no longer needed.
      
      So remove it.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      7fb9dadc
    • D
      md: make recovery started by do_md_run() visible via sync_action · a2d79c32
      Dan Williams 提交于
      By default md_do_sync() will perform recovery if no other actions are
      specified.  However, action_show() relies on MD_RECOVERY_RECOVER to be
      set otherwise it returns 'idle'.  So, add a missing set
      MD_RECOVERY_RECOVER when starting recovery.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      a2d79c32
    • N
      md: fix small irregularity with start_ro module parameter · 0f9552b5
      NeilBrown 提交于
      The start_ro modules parameter can be used to force arrays to be
      started in 'auto-readonly' in which they are read-only until the first
      write.  This ensures that no resync/recovery happens until something
      else writes to the device.  This is important for resume-from-disk
      off an md array.
      
      However if an array is started 'readonly' (by writing 'readonly' to
      the 'array_state' sysfs attribute) we want it to be really 'readonly',
      not 'auto-readonly'.
      
      So strengthen the condition to only set auto-readonly if the
      array is not already read-only.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      0f9552b5
    • N
      md: Fix unfortunate interaction with evms · cbd19983
      NeilBrown 提交于
      evms configures md arrays by:
        open device
        send ioctl
        close device
      
      for each different ioctl needed.
      Since 2.6.29, the device can disappear after the 'close'
      unless a significant configuration has happened to the device.
      The change made by "SET_ARRAY_INFO" can too minor to stop the device
      from disappearing, but important enough that losing the change is bad.
      
      So: make sure SET_ARRAY_INFO sets mddev->ctime, and keep the device
      active as long as ctime is non-zero (it gets zeroed with lots of other
      things when the array is stopped).
      
      This is suitable for -stable kernels since 2.6.29.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      cbd19983
  2. 25 12月, 2009 10 次提交
  3. 24 12月, 2009 25 次提交