summaryrefslogtreecommitdiff
path: root/managemon.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-02-01 14:44:02 +1100
committerNeilBrown <neilb@suse.de>2011-02-01 14:44:02 +1100
commitf54a6742b2fc0f874cbb46f404aa4b4f94dad896 (patch)
tree6834b3125f90cfe323040ee5bfa85dac240bc2eb /managemon.c
parenta5d10dcec81b46f68d18408dcdced4235df99c55 (diff)
downloadmdadm-f54a6742b2fc0f874cbb46f404aa4b4f94dad896.tar.gz
managemon: don't try to add spares when resync/recovery is happening.
kernel should reject this anyway, and we really should not be trying as it can only lead to confusion. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/managemon.c b/managemon.c
index 269d06e..63c9705 100644
--- a/managemon.c
+++ b/managemon.c
@@ -448,6 +448,12 @@ static void manage_member(struct mdstat_ent *mdstat,
else
frozen = 1; /* can't read metadata_version assume the worst */
+ /* If sync_action is not 'idle' then don't try recovery now */
+ if (!frozen
+ && sysfs_get_str(&a->info, NULL, "sync_action", buf, sizeof(buf)) > 0
+ && strncmp(buf, "idle", 4) != 0)
+ frozen = 1;
+
if (mdstat->level) {
int level = map_name(pers, mdstat->level);
if (a->info.array.level != level && level >= 0) {