1. 18 May, 2010 20 commits
  2. 17 May, 2010 3 commits
    • NeilBrown's avatar
      md: manage redundancy group in sysfs when changing level. · a64c876f
      NeilBrown authored
      Some levels expect the 'redundancy group' to be present,
      others don't.
      So when we change level of an array we might need to
      add or remove this group.
      
      This requires fixing up the current practice of overloading ->private
      to indicate (when ->pers == NULL) that something needs to be removed.
      So create a new ->to_remove to fill that role.
      
      When changing levels, we may need to add or remove attributes.  When
      changing RAID5 -> RAID6, we both add and remove the same thing.  It is
      important to catch this and optimise it out as the removal is delayed
      until a lock is released, so trying to add immediately would cause
      problems.
      
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      a64c876f
    • NeilBrown's avatar
      md: remove unneeded sysfs files more promptly · b6eb127d
      NeilBrown authored
      When an array is stopped we need to remove some
      sysfs files which are dependent on the type of array.
      
      We need to delay that deletion as deleting them while holding
      reconfig_mutex can lead to deadlocks.
      
      We currently delay them until the array is completely destroyed.
      However it is possible to deactivate and then reactivate the array.
      It is also possible to need to remove sysfs files when changing level,
      which can potentially happen several times before an array is
      destroyed.
      
      So we need to delete these files more promptly: as soon as
      reconfig_mutex is dropped.
      
      We need to ensure this happens before do_md_run can restart the array,
      so we use open_mutex for some extra locking.  This is not deadlock
      prone.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      b6eb127d
    • NeilBrown's avatar
      md/linear: avoid possible oops and array stop · ef2f80ff
      NeilBrown authored
      Since commit ef286f6f
      it has been important that each personality clears
      ->private in the ->stop() function, or sets it to a
      attribute group to be removed.
      linear.c doesn't.  This can sometimes lead to an oops,
      though it doesn't always.
      
      Suitable for 2.6.33-stable and 2.6.34.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      ef2f80ff
  3. 11 May, 2010 1 commit
    • Dan Williams's avatar
      md: set mddev readonly flag on blkdev BLKROSET ioctl · e2218350
      Dan Williams authored
      When the user sets the block device to readwrite then the mddev should
      follow suit.  Otherwise, the BUG_ON in md_write_start() will be set to
      trigger.
      
      The reverse direction, setting mddev->ro to match a set readonly
      request, can be ignored because the blkdev level readonly flag precludes
      the need to have mddev->ro set correctly.  Nevermind the fact that
      setting mddev->ro to 1 may fail if the array is in use.
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      e2218350
  4. 16 Mar, 2010 1 commit
    • NeilBrown's avatar
      md: deal with merge_bvec_fn in component devices better. · 627a2d3c
      NeilBrown authored
      If a component device has a merge_bvec_fn then as we never call it
      we must ensure we never need to.  Currently this is done by setting
      max_sector to 1 PAGE, however this does not stop a bio being created
      with several sub-page iovecs that would violate the merge_bvec_fn.
      
      So instead set max_segments to 1 and set the segment boundary to the
      same as a page boundary to ensure there is only ever one single-page
      segment of IO requested at a time.
      
      This can particularly be an issue when 'xen' is used as it is
      known to submit multiple small buffers in a single bio.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      627a2d3c
  5. 08 Mar, 2010 1 commit
  6. 07 Mar, 2010 14 commits