1. 01 10月, 2012 22 次提交
  2. 20 9月, 2012 15 次提交
  3. 19 9月, 2012 3 次提交
    • N
      md: make sure metadata is updated when spares are activated or removed. · 6dafab6b
      NeilBrown 提交于
      It isn't always necessary to update the metadata when spares are
      removed as the presence-or-not of a spare isn't really important to
      the integrity of an array.
      Also activating a spare doesn't always require updating the metadata
      as the update on 'recovery-completed' is usually sufficient.
      
      However the introduction of 'replacement' devices have made these
      transitions sometimes more important.  For example the 'Replacement'
      flag isn't cleared until the original device is removed, so we need
      to ensure a metadata update after that 'spare' is removed.
      
      So set MD_CHANGE_DEVS whenever a spare is activated or removed, to
      complement the current situation where it is set when a spare is added
      or a device is failed (or a number of other less common situations).
      
      This is suitable for -stable as out-of-data metadata could lead
      to data corruption.
      This is only relevant for 3.3 and later 9when 'replacement' as
      introduced.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      6dafab6b
    • N
      md/raid5: fix calculate of 'degraded' when a replacement becomes active. · e5c86471
      NeilBrown 提交于
      When a replacement device becomes active, we mark the device that it
      replaces as 'faulty' so that it can subsequently get removed.
      However 'calc_degraded' only pays attention to the primary device, not
      the replacement, so the array appears to become degraded, which is
      wrong.
      
      So teach 'calc_degraded' to consider any replacement if a primary
      device is faulty.
      
      This is suitable for -stable as an incorrect 'degraded' value can
      confuse md and could lead to data corruption.
      This is only relevant for 3.3 and later.
      
      Cc: stable@vger.kernel.org
      Reported-by: NRobin Hill <robin@robinhill.me.uk>
      Reported-by: NJohn Drescher <drescherjm@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      e5c86471
    • N
      Revert "md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_ACTIVE." · a852d7b8
      NeilBrown 提交于
      This reverts commit 895e3c5c.
      
      While this patch seemed like a good idea and did help some workloads,
      it hurts other workloads.
      Large sequential O_DIRECT writes were faster,
      Small random O_DIRECT writes were slower.
      
      Other changes (batching RAID5 writes) have improved the sequential
      writes using a different mechanism, so the net result of this patch
      is definitely negative.  So revert it.
      Reported-by: NShaohua Li <shli@kernel.org>
      Tested-by: NJianpeng Ma <majianpeng@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      a852d7b8