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 /mdadm.c | |
parent | c7c149300b170656485f4ac10ed7cfbd4fd6d0bb (diff) |
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 'mdadm.c')
-rw-r--r-- | mdadm.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1257,6 +1257,16 @@ int main(int argc, char *argv[]) put_md_name(name); } + /* This is a bit of a hack. + * When we stop an array in a container, it + * takes a moment for mdmon to let go. + * So just pause briefly incase that is + * happening. Maybe we should do something + * more deterministic via the socket. + */ + if (progress && err) + usleep(50000); + } while (!last && err); if (err) rv |= 1; } else { |