aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-07-20 20:24:40 -0400
committerSage Weil <sage@inktank.com>2012-07-30 21:16:00 -0400
commit8dacc7da69a491c515851e68de6036f21b5663ce (patch)
tree72e96abb5bc27d2a185cdea2f08a090302f0ede3 /include/linux/ceph
parentd7353dd5aaf22ed611fbcd0d4a4a12fb30659290 (diff)
libceph: replace connection state bits with states
Use a simple set of 6 enumerated values for the socket states (CON_STATE_*) and use those instead of the state bits. All of the con->state checks are now under the protection of the con mutex, so this is safe. It also simplifies many of the state checks because we can check for anything other than the expected state instead of various bits for races we can think of. This appears to hold up well to stress testing both with and without socket failure injection on the server side. Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/messenger.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index a310d7fe6e29..d9c2b8f5abde 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -117,18 +117,6 @@ struct ceph_msg_pos {
117#define BACKOFF 15 117#define BACKOFF 15
118 118
119/* 119/*
120 * ceph_connection states
121 */
122#define CONNECTING 1
123#define NEGOTIATING 2
124#define CONNECTED 5
125#define STANDBY 8 /* no outgoing messages, socket closed. we keep
126 * the ceph_connection around to maintain shared
127 * state with the peer. */
128#define CLOSED 10 /* we've closed the connection */
129#define OPENING 13 /* open connection w/ (possibly new) peer */
130
131/*
132 * A single connection with another host. 120 * A single connection with another host.
133 * 121 *
134 * We maintain a queue of outgoing messages, and some session state to 122 * We maintain a queue of outgoing messages, and some session state to