]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: send subscribe along with mount request
authorSage Weil <sage@newdream.net>
Thu, 3 Sep 2009 22:14:22 +0000 (15:14 -0700)
committerSage Weil <sage@newdream.net>
Thu, 3 Sep 2009 22:14:22 +0000 (15:14 -0700)
We used to have to wait to learn our address; no more.

src/kernel/mon_client.c

index 091f3f5b0a2c826b766574a41e5039743e065e27..06f13291e847e01f06586f2e27b80147790f2336 100644 (file)
  * algorithm to manage the MDS map (mds cluster membership), OSD map, and
  * list of clients who have mounted the file system.
  *
- * Communication with the monitor cluster is lossy, so requests for
- * information may have to be resent if we time out waiting for a response.
- * As long as we do not time out, we continue to send all requests to the
- * same monitor.  If there is a problem, we randomly pick a new monitor from
- * the cluster to try.
+ * We maintain an open, active session with a monitor at all times in order to
+ * receive timely MDSMap updates.  We periodically send a keepalive byte on the
+ * TCP socket to ensure we detect a failure.  If the connection does break, we
+ * randomly hunt for a new monitor.  Once the connection is reestablished, we
+ * resend any outstanding requests.
  */
 
 const static struct ceph_connection_operations mon_con_ops;
@@ -516,8 +516,8 @@ static void delayed_work(struct work_struct *work)
                } else {
                        ceph_con_keepalive(monc->con);
                }
-               __send_subscribe(monc);
        }
+       __send_subscribe(monc);
        __schedule_delayed(monc);
        mutex_unlock(&monc->mutex);
 }