summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2017-05-09 23:15:14 +0200
committerJes Sorensen <jsorensen@fb.com>2017-05-09 23:15:14 +0200
commite5eb6857cde0a6a44684dcc7ea0fb196546cf56c (patch)
tree58010df45df43d15fed25dbce69c49dbb414ef2d /Monitor.c
parentsysfs/sysfs_read: Count working_disks (diff)
downloadmdadm-e5eb6857cde0a6a44684dcc7ea0fb196546cf56c.tar.xz
mdadm-e5eb6857cde0a6a44684dcc7ea0fb196546cf56c.zip
Monitor/check_array: Use working_disks from sysfs
sysfs now provides working_disks information, so lets use it too. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Monitor.c b/Monitor.c
index 22045280..5b958478 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -524,7 +524,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
}
if (st->utime == array.utime && st->failed == sra->array.failed_disks &&
- st->working == array.working_disks &&
+ st->working == sra->array.working_disks &&
st->spare == sra->array.spare_disks &&
(mse == NULL || (mse->percent == st->percent))) {
if ((st->active < st->raid) && st->spare == 0)
@@ -637,7 +637,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
st->devid[i] = makedev(disc.major, disc.minor);
}
st->active = sra->array.active_disks;
- st->working = array.working_disks;
+ st->working = sra->array.working_disks;
st->spare = sra->array.spare_disks;
st->failed = sra->array.failed_disks;
st->utime = array.utime;