Commit 1a494e59 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: correct "working_disk" counts for raid5 and raid6

This error only affects two message (and sysadmin heart-rate).  It does not
risk data.
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 765dad09
......@@ -477,8 +477,8 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
if (!rdev->faulty) {
mddev->sb_dirty = 1;
conf->working_disks--;
if (rdev->in_sync) {
conf->working_disks--;
mddev->degraded++;
conf->failed_disks++;
rdev->in_sync = 0;
......
......@@ -498,8 +498,8 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
if (!rdev->faulty) {
mddev->sb_dirty = 1;
conf->working_disks--;
if (rdev->in_sync) {
conf->working_disks--;
mddev->degraded++;
conf->failed_disks++;
rdev->in_sync = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment