]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Incremental.c
Get failed disk count from array state
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>
Wed, 31 May 2017 10:46:57 +0000 (12:46 +0200)
committerJes Sorensen <jsorensen@fb.com>
Mon, 5 Jun 2017 15:11:36 +0000 (11:11 -0400)
commitb13b52c80f3d9e3184ea1d6d39aa7053ef7bae49
tree73eaea57c092420f3886fdb6fb4a341424e9c17b
parent07c45a1871df0a70beb8da80d11601d33c7a5de2
Get failed disk count from array state

Recent commit has changed the way failed disks are counted. It breaks
recovery for external metadata arrays as failed disks are not part of
the array and have no corresponding entries is sysfs (they are only
reported for containers) so degraded arrays show no failed disks.

Recent commit overwrites GET_DEGRADED result prior to GET_STATE and it
is not set again if GET_STATE has not been requested. As GET_STATE
provides the same information as GET_DEGRADED, the latter is not needed
anymore. Remove GET_DEGRADED option and replace it with GET_STATE
option.

Don't count number of failed disks looking at sysfs entries but
calculate it at the end. Do it only for arrays as containers report
no disks, just spares.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Incremental.c
Monitor.c
managemon.c
mdadm.h
raid6check.c
sysfs.c