1. 22 6月, 2009 31 次提交
  2. 19 6月, 2009 1 次提交
  3. 18 6月, 2009 8 次提交
    • N
      md/raid5: correctly update sync_completed when we reach max_resync · 48606a9f
      NeilBrown 提交于
      At the end of reshape_request we update cyrr_resync_completed
      if we are about to pause due to reaching resync_max.
      However we update it to the wrong value.  We need to add the
      "reshape_sectors" that have just been reshaped.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      48606a9f
    • D
      md/raid5: add missing call to schedule() after prepare_to_wait() · 7a3ab908
      Dan Williams 提交于
      In the unlikely event that reshape progresses past the current request
      while it is waiting for a stripe we need to schedule() before retrying
      for 2 reasons:
      1/ Prevent list corruption from duplicated list_add() calls without
         intervening list_del().
      2/ Give the reshape code a chance to make some progress to resolve the
         conflict.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      7a3ab908
    • N
      md/linear: use call_rcu to free obsolete 'conf' structures. · 495d3573
      NeilBrown 提交于
      Current, when we update the 'conf' structure, when adding a
      drive to a linear array, we keep the old version around until
      the array is finally stopped, as it is not safe to free it
      immediately.
      
      Now that we have rcu protection on all accesses to 'conf',
      we can use call_rcu to free it more promptly.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      495d3573
    • S
      md linear: Protecting mddev with rcu locks to avoid races · af11c397
      SandeepKsinha 提交于
      
      Due to the lack of memory ordering guarantees, we may have races around
      mddev->conf.
      
      In particular, the correct contents of the structure we get from
      dereferencing ->private might not be visible to this CPU yet, and
      they might not be correct w.r.t mddev->raid_disks.
      
      This patch addresses the problem using rcu protection to avoid
      such race conditions.
      Signed-off-by: NSandeepKsinha <sandeepksinha@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      af11c397
    • A
      md: Move check for bitmap presence to personality code. · 0894cc30
      Andre Noll 提交于
      If the superblock of a component device indicates the presence of a
      bitmap but the corresponding raid personality does not support bitmaps
      (raid0, linear, multipath, faulty), then something is seriously wrong
      and we'd better refuse to run such an array.
      
      Currently, this check is performed while the superblocks are examined,
      i.e. before entering personality code. Therefore the generic md layer
      must know which raid levels support bitmaps and which do not.
      
      This patch avoids this layer violation without adding identical code
      to various personalities. This is accomplished by introducing a new
      public function to md.c, md_check_no_bitmap(), which replaces the
      hard-coded checks in the superblock loading functions.
      
      A call to md_check_no_bitmap() is added to the ->run method of each
      personality which does not support bitmaps and assembly is aborted
      if at least one component device contains a bitmap.
      Signed-off-by: NAndre Noll <maan@systemlinux.org>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      0894cc30
    • N
      md: remove chunksize rounding from common code. · 8190e754
      NeilBrown 提交于
      It is easiest to round sizes to multiples of chunk size in
      the personality code for those personalities which care.
      Those personalities now do the rounding, so we can
      remove that function from common code.
      
      Also remove the upper bound on the size of a chunk, and the lower
      bound on the size of a device (1 chunk), neither of which really buy
      us anything.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      8190e754
    • N
      md: raid0/linear: ensure device sizes are rounded to chunk size. · 13f2682b
      NeilBrown 提交于
      This is currently ensured by common code, but it is more reliable to
      ensure it where it is needed in personality code.
      All the other personalities that care already round the size to
      the chunk_size.  raid0 and linear are the only hold-outs.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      13f2682b
    • N
      md: move assignment of ->utime so that it never gets skipped. · 1b57f132
      NeilBrown 提交于
      Currently the assignment to utime gets skipped for 'external'
      metadata.  So move it to the top of the function so that it
      always gets effected.
      This is of largely cosmetic interest.  Nothing actually depends
      on ->utime being right for external arrays.
      "mdadm --monitor" does use it for 0.90 and 1.x arrays, but with
      mdadm-3.0, this is not important for external metadata.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      1b57f132