summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorHawrylewicz Czarnowski, Przemyslaw <przemyslaw.hawrylewicz.czarnowski@intel.com>2010-12-07 07:44:21 +0100
committerNeilBrown <neilb@suse.de>2010-12-07 11:12:38 +0100
commit6f4cdfd92729ba1309fd7a82f31cee0441f243dd (patch)
treeb0d68b868a6d22d85d7b7a23c30e4fb25598212d /monitor.c
parentfix: incremental on invalid container causes segfault (diff)
downloadmdadm-6f4cdfd92729ba1309fd7a82f31cee0441f243dd.tar.xz
mdadm-6f4cdfd92729ba1309fd7a82f31cee0441f243dd.zip
fix: mdadm -Ss for external metadata don't stop container
Sometimes (~50%) mdadm -Ss cannot stop container as mdmon opens its device and do not close it before exit(). The period between open and release of handle is too long and md is not able stop device. Releasing handle before exit does not block md. Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 59b41819..f166bc8f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -525,6 +525,7 @@ static int wait_and_act(struct supertype *container, int nowait)
remove_pidfile(container->devname);
exit_now = 1;
signal_manager();
+ close(fd);
exit(0);
}
}