summaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorAlex Elder2012-05-23 21:35:23 +0200
committerSage Weil2012-07-06 06:14:27 +0200
commite27947c767f5bed15048f4e4dad3e2eb69133697 (patch)
tree7521d46e58b360930d95f7eeb86396d4f729db57 /include/linux/ceph
parentlibceph: clear NEGOTIATING when done (diff)
downloadkernel-qcow2-linux-e27947c767f5bed15048f4e4dad3e2eb69133697.tar.gz
kernel-qcow2-linux-e27947c767f5bed15048f4e4dad3e2eb69133697.tar.xz
kernel-qcow2-linux-e27947c767f5bed15048f4e4dad3e2eb69133697.zip
libceph: define and use an explicit CONNECTED state
There is no state explicitly defined when a ceph connection is fully operational. So define one. It's set when the connection sequence completes successfully, and is cleared when the connection gets closed. Be a little more careful when examining the old state when a socket disconnect event is reported. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/messenger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index cc6f9bdcf466..002d504df3b7 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -120,6 +120,7 @@ struct ceph_msg_pos {
*/
#define CONNECTING 1
#define NEGOTIATING 2
+#define CONNECTED 5
#define STANDBY 8 /* no outgoing messages, socket closed. we keep
* the ceph_connection around to maintain shared
* state with the peer. */