summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2012-02-07 15:03:43 +0100
committerNeilBrown <neilb@suse.de>2012-02-09 02:20:52 +0100
commit78340e26a54db960de238b511f5cdc74aebe4453 (patch)
tree453a9b5a01b90b3bfea7fde8cf420efa5d6a5eb3 /msg.c
parentFix: Sometimes mdmon throws core dump during reshape (diff)
downloadmdadm-78340e26a54db960de238b511f5cdc74aebe4453.tar.xz
mdadm-78340e26a54db960de238b511f5cdc74aebe4453.zip
Flush mdmon before next reshape step during container operation
Using takeover operation for grow purposes, mdadm has to be sure that mdmon processes all updates, and if necessary it will be closed at takeover to raid0 operation. If mdmon is late, next array in container is processed and due to race condition mdmon closes itself instead to monitor next reshape operation. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/msg.c b/msg.c
index dc780b3e..44aad1f6 100644
--- a/msg.c
+++ b/msg.c
@@ -487,3 +487,13 @@ int ping_manager(char *devname)
close(sfd);
return err;
}
+
+/* using takeover operation for grow purposes, mdadm has to be sure
+ * that mdmon processes all updates, and if necessary it will be closed
+ * at takeover to raid0 operation
+ */
+void flush_mdmon(char *container)
+{
+ ping_manager(container);
+ ping_monitor(container);
+}