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:
parent
a792ece676
commit
4e5e54cf82
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue