]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - msg.c
imsm: add support for checkpointing via 'curr_migr_unit'
[thirdparty/mdadm.git] / msg.c
diff --git a/msg.c b/msg.c
index 5a4839fad7bf40e6fadd745b7228e15b3df1204e..8d52b948fa639ce4ae02d1a8768cd675b1363d58 100644 (file)
--- a/msg.c
+++ b/msg.c
@@ -177,10 +177,8 @@ int connect_monitor(char *devname)
        return sfd;
 }
 
-/* give the monitor a chance to update the metadata */
-int ping_monitor(char *devname)
+int fping_monitor(int sfd)
 {
-       int sfd = connect_monitor(devname);
        int err = 0;
 
        if (sfd < 0)
@@ -194,6 +192,16 @@ int ping_monitor(char *devname)
        if (!err && wait_reply(sfd, 20) != 0)
                err = -1;
 
+       return err;
+}
+
+
+/* give the monitor a chance to update the metadata */
+int ping_monitor(char *devname)
+{
+       int sfd = connect_monitor(devname);
+       int err = fping_monitor(sfd);
+
        close(sfd);
        return err;
 }