diff options
author | Sage Weil <sage@newdream.net> | 2010-03-25 18:45:38 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 18:25:32 -0400 |
commit | dbad185d4939ffb806f6fa753ef9f470e3b72b62 (patch) | |
tree | 0d3aaa8f0028c8b4c7826ff2a9c292ca862cd64a /fs/ceph/msgr.h | |
parent | a5ee751c15016d0deee0d651e42a3b163ea73ade (diff) |
ceph: drop src address(es) from message header [new protocol feature]
The CEPH_FEATURE_NOSRCADDR protocol feature avoids putting the full source
address in each message header (twice). This patch switches the client to
the new scheme, and _requires_ this feature on the server. The server
will support both the old and new schemes. That means an old client will
work with a new server, but a new client will not work with an old server.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/msgr.h')
-rw-r--r-- | fs/ceph/msgr.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/fs/ceph/msgr.h b/fs/ceph/msgr.h index 8aaab414f3f8..6baa8e4f8e7f 100644 --- a/fs/ceph/msgr.h +++ b/fs/ceph/msgr.h | |||
@@ -120,7 +120,7 @@ struct ceph_msg_connect_reply { | |||
120 | /* | 120 | /* |
121 | * message header | 121 | * message header |
122 | */ | 122 | */ |
123 | struct ceph_msg_header { | 123 | struct ceph_msg_header_old { |
124 | __le64 seq; /* message seq# for this session */ | 124 | __le64 seq; /* message seq# for this session */ |
125 | __le64 tid; /* transaction id */ | 125 | __le64 tid; /* transaction id */ |
126 | __le16 type; /* message type */ | 126 | __le16 type; /* message type */ |
@@ -138,6 +138,24 @@ struct ceph_msg_header { | |||
138 | __le32 crc; /* header crc32c */ | 138 | __le32 crc; /* header crc32c */ |
139 | } __attribute__ ((packed)); | 139 | } __attribute__ ((packed)); |
140 | 140 | ||
141 | struct ceph_msg_header { | ||
142 | __le64 seq; /* message seq# for this session */ | ||
143 | __le64 tid; /* transaction id */ | ||
144 | __le16 type; /* message type */ | ||
145 | __le16 priority; /* priority. higher value == higher priority */ | ||
146 | __le16 version; /* version of message encoding */ | ||
147 | |||
148 | __le32 front_len; /* bytes in main payload */ | ||
149 | __le32 middle_len;/* bytes in middle payload */ | ||
150 | __le32 data_len; /* bytes of data payload */ | ||
151 | __le16 data_off; /* sender: include full offset; | ||
152 | receiver: mask against ~PAGE_MASK */ | ||
153 | |||
154 | struct ceph_entity_name src; | ||
155 | __le32 reserved; | ||
156 | __le32 crc; /* header crc32c */ | ||
157 | } __attribute__ ((packed)); | ||
158 | |||
141 | #define CEPH_MSG_PRIO_LOW 64 | 159 | #define CEPH_MSG_PRIO_LOW 64 |
142 | #define CEPH_MSG_PRIO_DEFAULT 127 | 160 | #define CEPH_MSG_PRIO_DEFAULT 127 |
143 | #define CEPH_MSG_PRIO_HIGH 196 | 161 | #define CEPH_MSG_PRIO_HIGH 196 |