Blame SOURCES/Monitor-check_array-Get-arraydisks-from-sysfs.patch
|
|
2c1b57 |
From 12a9d21f4e9fd4d3a14129407f1e8da6d6444cd6 Mon Sep 17 00:00:00 2001
|
|
|
2c1b57 |
From: Jes Sorensen <jsorensen@fb.com>
|
|
|
2c1b57 |
Date: Tue, 9 May 2017 16:58:55 -0400
|
|
|
2c1b57 |
Subject: [RHEL7.5 PATCH 131/169] Monitor/check_array: Get array_disks from
|
|
|
2c1b57 |
sysfs
|
|
|
2c1b57 |
|
|
|
2c1b57 |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
2c1b57 |
---
|
|
|
2c1b57 |
Monitor.c | 4 ++--
|
|
|
2c1b57 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
2c1b57 |
|
|
|
2c1b57 |
diff --git a/Monitor.c b/Monitor.c
|
|
|
2c1b57 |
index 9456efd..fe6f2b4 100644
|
|
|
2c1b57 |
--- a/Monitor.c
|
|
|
2c1b57 |
+++ b/Monitor.c
|
|
|
2c1b57 |
@@ -481,7 +481,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
|
|
|
2c1b57 |
if (st->devnm[0] == 0)
|
|
|
2c1b57 |
strcpy(st->devnm, fd2devnm(fd));
|
|
|
2c1b57 |
|
|
|
2c1b57 |
- sra = sysfs_read(-1, st->devnm, GET_LEVEL | GET_DEGRADED |
|
|
|
2c1b57 |
+ sra = sysfs_read(-1, st->devnm, GET_LEVEL | GET_DISKS | GET_DEGRADED |
|
|
|
2c1b57 |
GET_MISMATCH);
|
|
|
2c1b57 |
if (!sra)
|
|
|
2c1b57 |
goto disappeared;
|
|
|
2c1b57 |
@@ -641,7 +641,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
|
|
|
2c1b57 |
st->spare = array.spare_disks;
|
|
|
2c1b57 |
st->failed = sra->array.failed_disks;
|
|
|
2c1b57 |
st->utime = array.utime;
|
|
|
2c1b57 |
- st->raid = array.raid_disks;
|
|
|
2c1b57 |
+ st->raid = sra->array.raid_disks;
|
|
|
2c1b57 |
st->err = 0;
|
|
|
2c1b57 |
if ((st->active < st->raid) && st->spare == 0)
|
|
|
2c1b57 |
retval = 1;
|
|
|
2c1b57 |
--
|
|
|
2c1b57 |
2.7.4
|
|
|
2c1b57 |
|