fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / fs / ocfs2 / cluster / tcp_internal.h
index ff9e2e2..b700dc9 100644 (file)
 #define O2NET_MSG_KEEP_REQ_MAGIC  ((u16)0xfa57)
 #define O2NET_MSG_KEEP_RESP_MAGIC ((u16)0xfa58)
 
-/* same as hb delay, we're waiting for another node to recognize our hb */
-#define O2NET_RECONNECT_DELAY_MS       O2HB_REGION_TIMEOUT_MS
-
 /* we're delaying our quorum decision so that heartbeat will have timed
  * out truly dead nodes by the time we come around to making decisions
  * on their number */
 #define O2NET_QUORUM_DELAY_MS  ((o2hb_dead_threshold + 2) * O2HB_REGION_TIMEOUT_MS)
 
-#define O2NET_KEEPALIVE_DELAY_SECS     5
-#define O2NET_IDLE_TIMEOUT_SECS                10
-
 /* 
  * This version number represents quite a lot, unfortunately.  It not
  * only represents the raw network message protocol on the wire but also
  * locking semantics of the file system using the protocol.  It should 
  * be somewhere else, I'm sure, but right now it isn't.
  *
+ * New in version 5:
+ *     - Network timeout checking protocol
+ *
+ * New in version 4:
+ *     - Remove i_generation from lock names for better stat performance.
+ *
+ * New in version 3:
+ *     - Replace dentry votes with a cluster lock
+ *
  * New in version 2:
  *     - full 64 bit i_size in the metadata lock lvbs
  *     - introduction of "rw" lock and pushing meta/data locking down
  */
-#define O2NET_PROTOCOL_VERSION 2ULL
+#define O2NET_PROTOCOL_VERSION 5ULL
 struct o2net_handshake {
        __be64  protocol_version;
        __be64  connector_id;
+       __be32  o2hb_heartbeat_timeout_ms;
+       __be32  o2net_idle_timeout_ms;
+       __be32  o2net_keepalive_delay_ms;
+       __be32  o2net_reconnect_delay_ms;
 };
 
 struct o2net_node {
@@ -80,18 +87,18 @@ struct o2net_node {
         * connect attempt fails and so can be self-arming.  shutdown is
         * careful to first mark the nn such that no connects will be attempted
         * before canceling delayed connect work and flushing the queue. */
-       struct work_struct              nn_connect_work;
+       struct delayed_work             nn_connect_work;
        unsigned long                   nn_last_connect_attempt;
 
        /* this is queued as nodes come up and is canceled when a connection is
         * established.  this expiring gives up on the node and errors out
         * transmits */
-       struct work_struct              nn_connect_expired;
+       struct delayed_work             nn_connect_expired;
 
        /* after we give up on a socket we wait a while before deciding
         * that it is still heartbeating and that we should do some
         * quorum work */
-       struct work_struct              nn_still_up;
+       struct delayed_work             nn_still_up;
 };
 
 struct o2net_sock_container {
@@ -123,7 +130,7 @@ struct o2net_sock_container {
        struct work_struct      sc_shutdown_work;
 
        struct timer_list       sc_idle_timeout;
-       struct work_struct      sc_keepalive_work;
+       struct delayed_work     sc_keepalive_work;
 
        unsigned                sc_handshake_ok:1;