mdmon: make sure we set safe_mode on SIGTERM.

Without this, array may not go clean and mdmon will then
not exit.

A safe_mode of '0' (which is the only one that is handled differently
by this patch) means "never switch to 'active_idle'".  We don't want
that when mdmon is stopping.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-09-02 12:08:44 +10:00
parent a792ece676
commit 4e5e54cf82
1 changed files with 1 additions and 1 deletions

View File

@ -494,7 +494,7 @@ static void manage_member(struct mdstat_ent *mdstat,
if (a->container == NULL)
return;
if (sigterm && a->info.safe_mode_delay > 1) {
if (sigterm && a->info.safe_mode_delay != 1) {
sysfs_set_safemode(&a->info, 1);
a->info.safe_mode_delay = 1;
}