diff options
author | Neil Brown <neilb@suse.de> | 2008-07-12 20:27:42 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-12 20:27:42 +1000 |
commit | 48561b014292e5052da3dc3df629c10d8531d7fd (patch) | |
tree | e3783538c3455e21f59163640b72c4a325257972 /managemon.c | |
parent | c7c149300b170656485f4ac10ed7cfbd4fd6d0bb (diff) | |
download | mdadm-48561b014292e5052da3dc3df629c10d8531d7fd.tar.gz mdadm-48561b014292e5052da3dc3df629c10d8531d7fd.tar.xz mdadm-48561b014292e5052da3dc3df629c10d8531d7fd.zip |
Improve shutdown for container-based arrays.
1/ close a race where multiple arrays disappear at once
and monitor isn't woken up to find out that the last one
has gone.
2/ "mdadm -Ss" needs to pause briefly for mdmon to exit.
Diffstat (limited to 'managemon.c')
-rw-r--r-- | managemon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/managemon.c b/managemon.c index 03de9a8..9b93ce4 100644 --- a/managemon.c +++ b/managemon.c @@ -159,6 +159,7 @@ static void remove_old(void) if (pending_discard == discard_this) pending_discard = NULL; discard_this = NULL; + wakeup_monitor(); } } @@ -174,7 +175,6 @@ static void replace_array(struct supertype *container, */ remove_old(); while (pending_discard) { - wakeup_monitor(); while (discard_this == NULL) sleep(1); remove_old(); |