summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>2017-05-31 12:46:57 +0200
committerJes Sorensen <jsorensen@fb.com>2017-06-05 11:11:36 -0400
commitb13b52c80f3d9e3184ea1d6d39aa7053ef7bae49 (patch)
tree73eaea57c092420f3886fdb6fb4a341424e9c17b /mdadm.h
parent07c45a1871df0a70beb8da80d11601d33c7a5de2 (diff)
downloadmdadm-b13b52c80f3d9e3184ea1d6d39aa7053ef7bae49.tar.gz
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>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/mdadm.h b/mdadm.h
index ec0a39e..ee9b837 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -637,7 +637,6 @@ enum sysfs_read_flags {
GET_MISMATCH = (1 << 5),
GET_VERSION = (1 << 6),
GET_DISKS = (1 << 7),
- GET_DEGRADED = (1 << 8),
GET_SAFEMODE = (1 << 9),
GET_BITMAP_LOCATION = (1 << 10),