diff options
author | Sage Weil <sage@newdream.net> | 2009-12-23 12:30:21 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-23 12:30:21 -0500 |
commit | 04a419f908b5291ff7e8ffd7aa351fa0ac0c08af (patch) | |
tree | 2e634bdca766c27b88280ab5c1ce067f47ffe536 /fs/ceph/msgr.h | |
parent | 6df058c025ce343052c5516b1d8a9a7e73cddd64 (diff) |
ceph: add feature bits to connection handshake (protocol change)
Define supported and required feature set. Fail connection if the server
requires features we do not support (TAG_FEATURES), or if the server does
not support features we require.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/msgr.h')
-rw-r--r-- | fs/ceph/msgr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/msgr.h b/fs/ceph/msgr.h index e46d8b806dea..be83f93182ee 100644 --- a/fs/ceph/msgr.h +++ b/fs/ceph/msgr.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * whenever the wire protocol changes. try to keep this string length | 21 | * whenever the wire protocol changes. try to keep this string length |
22 | * constant. | 22 | * constant. |
23 | */ | 23 | */ |
24 | #define CEPH_BANNER "ceph v025" | 24 | #define CEPH_BANNER "ceph v026" |
25 | #define CEPH_BANNER_MAX_LEN 30 | 25 | #define CEPH_BANNER_MAX_LEN 30 |
26 | 26 | ||
27 | 27 | ||
@@ -100,12 +100,14 @@ struct ceph_entity_inst { | |||
100 | #define CEPH_MSGR_TAG_KEEPALIVE 9 /* just a keepalive byte! */ | 100 | #define CEPH_MSGR_TAG_KEEPALIVE 9 /* just a keepalive byte! */ |
101 | #define CEPH_MSGR_TAG_BADPROTOVER 10 /* bad protocol version */ | 101 | #define CEPH_MSGR_TAG_BADPROTOVER 10 /* bad protocol version */ |
102 | #define CEPH_MSGR_TAG_BADAUTHORIZER 11 /* bad authorizer */ | 102 | #define CEPH_MSGR_TAG_BADAUTHORIZER 11 /* bad authorizer */ |
103 | #define CEPH_MSGR_TAG_FEATURES 12 /* insufficient features */ | ||
103 | 104 | ||
104 | 105 | ||
105 | /* | 106 | /* |
106 | * connection negotiation | 107 | * connection negotiation |
107 | */ | 108 | */ |
108 | struct ceph_msg_connect { | 109 | struct ceph_msg_connect { |
110 | __le64 features; /* supported feature bits */ | ||
109 | __le32 host_type; /* CEPH_ENTITY_TYPE_* */ | 111 | __le32 host_type; /* CEPH_ENTITY_TYPE_* */ |
110 | __le32 global_seq; /* count connections initiated by this host */ | 112 | __le32 global_seq; /* count connections initiated by this host */ |
111 | __le32 connect_seq; /* count connections initiated in this session */ | 113 | __le32 connect_seq; /* count connections initiated in this session */ |
@@ -117,6 +119,7 @@ struct ceph_msg_connect { | |||
117 | 119 | ||
118 | struct ceph_msg_connect_reply { | 120 | struct ceph_msg_connect_reply { |
119 | __u8 tag; | 121 | __u8 tag; |
122 | __le64 features; /* feature bits for this session */ | ||
120 | __le32 global_seq; | 123 | __le32 global_seq; |
121 | __le32 connect_seq; | 124 | __le32 connect_seq; |
122 | __le32 protocol_version; | 125 | __le32 protocol_version; |