summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-07-18 08:37:09 +0200
committerNeil Brown <neilb@suse.de>2008-07-18 08:37:09 +0200
commitdaf7a3ce96e517360b0456c3a9cca0771b94462d (patch)
treee1b396121c4b719f912919ada33fa207ec0ae3f3 /mdadm.c
parentmdmon: ping will wait for manage_mon to catch up. (diff)
downloadmdadm-daf7a3ce96e517360b0456c3a9cca0771b94462d.tar.xz
mdadm-daf7a3ce96e517360b0456c3a9cca0771b94462d.zip
Stop managed arrays more carefully.
If an array is being managed by mdmon, then just write "inactive" to stop it, and let mdmon do the final "clear". This makes sure mdmon has a chance to read the final state and update the metadata properly. After writing "inactive" with use "ping_monitor" to synchronise with mdadm, then STOP the array just in case it is still running, else we will get into an infinite loop in "mdadm -Ss". Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/mdadm.c b/mdadm.c
index 6fe6b99f..8b4b5dff 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1257,16 +1257,6 @@ 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 {