diff options
author | Jes Sorensen <jsorensen@fb.com> | 2017-05-09 23:15:14 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2017-05-09 23:15:14 +0200 |
commit | e5eb6857cde0a6a44684dcc7ea0fb196546cf56c (patch) | |
tree | 58010df45df43d15fed25dbce69c49dbb414ef2d /Monitor.c | |
parent | sysfs/sysfs_read: Count working_disks (diff) | |
download | mdadm-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |