diff options
author | NeilBrown <neilb@suse.de> | 2011-03-15 04:51:12 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-15 04:51:12 +0100 |
commit | 0c4f6e378b4fd9518e1037caab4babacf41ea6c8 (patch) | |
tree | 60d564e7a3d38f701eae78fd78c9048c620d2071 /managemon.c | |
parent | Manage/external: for external metadata, add_to_super needs lock on container. (diff) | |
download | mdadm-0c4f6e378b4fd9518e1037caab4babacf41ea6c8.tar.xz mdadm-0c4f6e378b4fd9518e1037caab4babacf41ea6c8.zip |
managemon: Don't do spare assignment while any updates are pending.
Spare assignment requires full knowledge of array state. A pending
update might modify that state (such as a pending spare assignment)
so don't try while there are updates pending.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r-- | managemon.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/managemon.c b/managemon.c index 3cf2389a..26ff1877 100644 --- a/managemon.c +++ b/managemon.c @@ -398,7 +398,12 @@ static void manage_member(struct mdstat_ent *mdstat, a->info.array.raid_disks = mdstat->raid_disks; // MORE - if (a->check_degraded) { + /* We don't check the array while any update is pending, as it + * might container a change (such as a spare assignment) which + * could affect our decisions. + */ + if (a->check_degraded && + update_queue == NULL && update_queue_pending == NULL) { struct metadata_update *updates = NULL; struct mdinfo *newdev = NULL; struct active_array *newa; |