1. 09 Jun, 2009 3 commits
    • NeilBrown's avatar
      md/raid5: fix bug in reshape code when chunk_size decreases. · 0e6e0271
      NeilBrown authored
      Now that we support changing the chunksize, we calculate
      "reshape_sectors" to be the max of number of sectors in old
      and new chunk size.
      However there is one please where we still use 'chunksize'
      rather than 'reshape_sectors'.
      This causes a reshape that reduces the size of chunks to freeze.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      0e6e0271
    • NeilBrown's avatar
      md/raid5 - avoid deadlocks in get_active_stripe during reshape · a8c906ca
      NeilBrown authored
      md has functionality to 'quiesce' and array so that all pending
      IO completed and no new IO starts.  This is used to achieve a
      stable state before making internal changes.
      
      Currently this quiescing applies equally to normal IO, resync
      IO, and reshape IO.
      However there is a problem with applying it to reshape IO.
      Reshape can have multiple 'stripe_heads' that must be active together.
      If the quiesce come between allocating the first and the last of
      such a collection, then we deadlock, as the last will not be allocated
      until the quiesce is lifted, the quiesce will not be lifted until the
      first (which has been allocated) gets used, and that first cannot be
      used until the last is allocated.
      
      It is not necessary to inhibit reshape IO when a quiesce is
      requested.  Those places in the code that require a full quiesce will
      ensure the reshape thread is not running at all.
      
      So allow reshape requests to get access to new stripe_heads without
      being blocked by a 'quiesce'.
      
      This only affects in-place reshapes (i.e. where the array does not
      grow or shrink) and these are only newly supported.  So this patch is
      not needed in earlier kernels.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      a8c906ca
    • NeilBrown's avatar
      md/raid5: use conf->raid_disks in preference to mddev->raid_disk · f001a70c
      NeilBrown authored
      mddev->raid_disks can be changed and any time by a request from
      user-space.  It is a suggestion as to what number of raid_disks is
      desired.
      
      conf->raid_disks can only be changed by the raid5 module with suitable
      locks in place.  It is a statement as to the current number of
      raid_disks.
      
      There are two places where the latter should be used, but the former
      is used.  This can lead to a crash when reshaping an array.
      
      This patch changes to mddev-> to conf->
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      f001a70c
  2. 06 Jun, 2009 6 commits
  3. 05 Jun, 2009 15 commits
  4. 04 Jun, 2009 10 commits
  5. 03 Jun, 2009 6 commits