ceph: save peer feature bits in connection structure
authorSage Weil <sage@newdream.net>
Wed, 12 May 2010 22:23:30 +0000 (15:23 -0700)
committerSage Weil <sage@newdream.net>
Mon, 17 May 2010 22:25:38 +0000 (15:25 -0700)
These are used for adjusting behavior, such as conditionally encoding a
newer message format.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/messenger.c
fs/ceph/messenger.h

index d18a544490f6360433c4abd489475a73f9394eef..50c5f24086fdb4d57492a5cd02ecc8da856edcc4 100644 (file)
@@ -1223,6 +1223,7 @@ static int process_connect(struct ceph_connection *con)
                clear_bit(CONNECTING, &con->state);
                con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
                con->connect_seq++;
+               con->peer_features = server_feat;
                dout("process_connect got READY gseq %d cseq %d (%d)\n",
                     con->peer_global_seq,
                     le32_to_cpu(con->in_reply.connect_seq),
index 4e5764c7fbc2cd5496ff3c219f4fd7f2fe8809d0..889f81f093c901b40e529be9a3066e0e2ee53f84 100644 (file)
@@ -142,6 +142,7 @@ struct ceph_connection {
        struct ceph_entity_addr peer_addr; /* peer address */
        struct ceph_entity_name peer_name; /* peer name */
        struct ceph_entity_addr peer_addr_for_me;
+       unsigned peer_features;
        u32 connect_seq;      /* identify the most recent connection
                                 attempt for this connection, client */
        u32 peer_global_seq;  /* peer's global seq for this connection */