diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-07-29 08:28:06 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-07-29 02:52:44 +0200 |
commit | e542713529e323ff09d7aeb5806cf29f6f160f53 (patch) | |
tree | 751dffc2043342eb6f76b0c37a07a698462b5516 /drivers/md/md.c | |
parent | md: do not progress the resync process if the stripe was blocked (diff) | |
download | linux-e542713529e323ff09d7aeb5806cf29f6f160f53.tar.xz linux-e542713529e323ff09d7aeb5806cf29f6f160f53.zip |
md: do not count blocked devices as spares
remove_and_add_spares() assumes that failed devices have been hot-removed
from the array. Removal is skipped in the 'blocked' case so do not count a
device in this state as 'spare'.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 0f1b83096425..c7aae66c6f9b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5996,7 +5996,8 @@ static int remove_and_add_spares(mddev_t *mddev) if (mddev->degraded) { rdev_for_each(rdev, rtmp, mddev) { if (rdev->raid_disk >= 0 && - !test_bit(In_sync, &rdev->flags)) + !test_bit(In_sync, &rdev->flags) && + !test_bit(Blocked, &rdev->flags)) spares++; if (rdev->raid_disk < 0 && !test_bit(Faulty, &rdev->flags)) { |