summaryrefslogtreecommitdiff
path: root/managemon.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-09-02 12:08:44 +1000
committerNeilBrown <neilb@suse.de>2013-09-02 12:08:44 +1000
commit4e5e54cf820fef717085faece24c2e666b3649f2 (patch)
treeab5204a1ac2b507fb46f9d84495c62e7f38171de /managemon.c
parenta792ece6768143ea557c63e35437536b9d235bb4 (diff)
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>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/managemon.c b/managemon.c
index f40bbdb3..fc8d1fe7 100644
--- a/managemon.c
+++ b/managemon.c
@@ -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;
}