aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster/tcp_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/cluster/tcp_internal.h')
-rw-r--r--fs/ocfs2/cluster/tcp_internal.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index 4b46aac7d243..b700dc9624d1 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -27,23 +27,20 @@
27#define O2NET_MSG_KEEP_REQ_MAGIC ((u16)0xfa57) 27#define O2NET_MSG_KEEP_REQ_MAGIC ((u16)0xfa57)
28#define O2NET_MSG_KEEP_RESP_MAGIC ((u16)0xfa58) 28#define O2NET_MSG_KEEP_RESP_MAGIC ((u16)0xfa58)
29 29
30/* same as hb delay, we're waiting for another node to recognize our hb */
31#define O2NET_RECONNECT_DELAY_MS O2HB_REGION_TIMEOUT_MS
32
33/* we're delaying our quorum decision so that heartbeat will have timed 30/* we're delaying our quorum decision so that heartbeat will have timed
34 * out truly dead nodes by the time we come around to making decisions 31 * out truly dead nodes by the time we come around to making decisions
35 * on their number */ 32 * on their number */
36#define O2NET_QUORUM_DELAY_MS ((o2hb_dead_threshold + 2) * O2HB_REGION_TIMEOUT_MS) 33#define O2NET_QUORUM_DELAY_MS ((o2hb_dead_threshold + 2) * O2HB_REGION_TIMEOUT_MS)
37 34
38#define O2NET_KEEPALIVE_DELAY_SECS 5
39#define O2NET_IDLE_TIMEOUT_SECS 10
40
41/* 35/*
42 * This version number represents quite a lot, unfortunately. It not 36 * This version number represents quite a lot, unfortunately. It not
43 * only represents the raw network message protocol on the wire but also 37 * only represents the raw network message protocol on the wire but also
44 * locking semantics of the file system using the protocol. It should 38 * locking semantics of the file system using the protocol. It should
45 * be somewhere else, I'm sure, but right now it isn't. 39 * be somewhere else, I'm sure, but right now it isn't.
46 * 40 *
41 * New in version 5:
42 * - Network timeout checking protocol
43 *
47 * New in version 4: 44 * New in version 4:
48 * - Remove i_generation from lock names for better stat performance. 45 * - Remove i_generation from lock names for better stat performance.
49 * 46 *
@@ -54,10 +51,14 @@
54 * - full 64 bit i_size in the metadata lock lvbs 51 * - full 64 bit i_size in the metadata lock lvbs
55 * - introduction of "rw" lock and pushing meta/data locking down 52 * - introduction of "rw" lock and pushing meta/data locking down
56 */ 53 */
57#define O2NET_PROTOCOL_VERSION 4ULL 54#define O2NET_PROTOCOL_VERSION 5ULL
58struct o2net_handshake { 55struct o2net_handshake {
59 __be64 protocol_version; 56 __be64 protocol_version;
60 __be64 connector_id; 57 __be64 connector_id;
58 __be32 o2hb_heartbeat_timeout_ms;
59 __be32 o2net_idle_timeout_ms;
60 __be32 o2net_keepalive_delay_ms;
61 __be32 o2net_reconnect_delay_ms;
61}; 62};
62 63
63struct o2net_node { 64struct o2net_node {
@@ -86,18 +87,18 @@ struct o2net_node {
86 * connect attempt fails and so can be self-arming. shutdown is 87 * connect attempt fails and so can be self-arming. shutdown is
87 * careful to first mark the nn such that no connects will be attempted 88 * careful to first mark the nn such that no connects will be attempted
88 * before canceling delayed connect work and flushing the queue. */ 89 * before canceling delayed connect work and flushing the queue. */
89 struct work_struct nn_connect_work; 90 struct delayed_work nn_connect_work;
90 unsigned long nn_last_connect_attempt; 91 unsigned long nn_last_connect_attempt;
91 92
92 /* this is queued as nodes come up and is canceled when a connection is 93 /* this is queued as nodes come up and is canceled when a connection is
93 * established. this expiring gives up on the node and errors out 94 * established. this expiring gives up on the node and errors out
94 * transmits */ 95 * transmits */
95 struct work_struct nn_connect_expired; 96 struct delayed_work nn_connect_expired;
96 97
97 /* after we give up on a socket we wait a while before deciding 98 /* after we give up on a socket we wait a while before deciding
98 * that it is still heartbeating and that we should do some 99 * that it is still heartbeating and that we should do some
99 * quorum work */ 100 * quorum work */
100 struct work_struct nn_still_up; 101 struct delayed_work nn_still_up;
101}; 102};
102 103
103struct o2net_sock_container { 104struct o2net_sock_container {
@@ -129,7 +130,7 @@ struct o2net_sock_container {
129 struct work_struct sc_shutdown_work; 130 struct work_struct sc_shutdown_work;
130 131
131 struct timer_list sc_idle_timeout; 132 struct timer_list sc_idle_timeout;
132 struct work_struct sc_keepalive_work; 133 struct delayed_work sc_keepalive_work;
133 134
134 unsigned sc_handshake_ok:1; 135 unsigned sc_handshake_ok:1;
135 136