1. 28 10月, 2010 4 次提交
    • T
      md: fix and update workqueue usage · e804ac78
      Tejun Heo 提交于
      Workqueue usage in md has two problems.
      
      * Flush can be used during or depended upon by memory reclaim, but md
        uses the system workqueue for flush_work which may lead to deadlock.
      
      * md depends on flush_scheduled_work() to achieve exclusion against
        completion of removal of previous instances.  flush_scheduled_work()
        may incur unexpected amount of delay and is scheduled to be removed.
      
      This patch adds two workqueues to md - md_wq and md_misc_wq.  The
      former is guaranteed to make forward progress under memory pressure
      and serves flush_work.  The latter serves as the flush domain for
      other works.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      e804ac78
    • N
      md: use sector_t in bitmap_get_counter · 57dab0bd
      NeilBrown 提交于
      bitmap_get_counter returns the number of sectors covered
      by the counter in a pass-by-reference variable.
      In some cases this can be very large, so make it a sector_t
      for safety.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      57dab0bd
    • N
      md: remove md_mutex locking. · 4b532c9b
      NeilBrown 提交于
      lock_kernel calls were recently pushed down into open/release
      functions.
      md doesn't need that protection.
      Then the BKL calls were change to md_mutex.  We don't need those
      either.
      So remove it all.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4b532c9b
    • N
      md: Fix regression with raid1 arrays without persistent metadata. · d97a41dc
      NeilBrown 提交于
      A RAID1 which has no persistent metadata, whether internal or
      external, will hang on the first write.
      This is caused by commit  070dc6dd
      In that case, MD_CHANGE_PENDING never gets cleared.
      
      So during md_update_sb, is neither persistent or external,
      clear MD_CHANGE_PENDING.
      
      This is suitable for 2.6.36-stable.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      d97a41dc
  2. 27 10月, 2010 36 次提交