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>
This commit is contained in:
parent
a5d10dcec8
commit
f54a6742b2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue