ceph: save peer feature bits in connection structure
These are used for adjusting behavior, such as conditionally encoding a newer message format. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
@@ -1223,6 +1223,7 @@ static int process_connect(struct ceph_connection *con)
|
|||||||
clear_bit(CONNECTING, &con->state);
|
clear_bit(CONNECTING, &con->state);
|
||||||
con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
|
con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
|
||||||
con->connect_seq++;
|
con->connect_seq++;
|
||||||
|
con->peer_features = server_feat;
|
||||||
dout("process_connect got READY gseq %d cseq %d (%d)\n",
|
dout("process_connect got READY gseq %d cseq %d (%d)\n",
|
||||||
con->peer_global_seq,
|
con->peer_global_seq,
|
||||||
le32_to_cpu(con->in_reply.connect_seq),
|
le32_to_cpu(con->in_reply.connect_seq),
|
||||||
|
@@ -142,6 +142,7 @@ struct ceph_connection {
|
|||||||
struct ceph_entity_addr peer_addr; /* peer address */
|
struct ceph_entity_addr peer_addr; /* peer address */
|
||||||
struct ceph_entity_name peer_name; /* peer name */
|
struct ceph_entity_name peer_name; /* peer name */
|
||||||
struct ceph_entity_addr peer_addr_for_me;
|
struct ceph_entity_addr peer_addr_for_me;
|
||||||
|
unsigned peer_features;
|
||||||
u32 connect_seq; /* identify the most recent connection
|
u32 connect_seq; /* identify the most recent connection
|
||||||
attempt for this connection, client */
|
attempt for this connection, client */
|
||||||
u32 peer_global_seq; /* peer's global seq for this connection */
|
u32 peer_global_seq; /* peer's global seq for this connection */
|
||||||
|
Reference in New Issue
Block a user