]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fix connect_seq on connect-side after connect
authorSage Weil <sage@newdream.net>
Thu, 13 Nov 2008 19:29:33 +0000 (11:29 -0800)
committerSage Weil <sage@newdream.net>
Thu, 13 Nov 2008 20:45:37 +0000 (12:45 -0800)
src/kernel/messenger.c

index 838c112c2f7da42cea4ccf8f9e0d2c88fb659788..fe75a92e57ce3098c1e1d2b85f76553e155da1a4 100644 (file)
@@ -1133,14 +1133,18 @@ static int process_connect(struct ceph_connection *con)
                break;
 
        case CEPH_MSGR_TAG_READY:
-               dout(10, "process_connect got READY, now open\n");
                clear_bit(CONNECTING, &con->state);
-
                if (le32_to_cpu(con->in_reply.flags) & CEPH_MSG_CONNECT_LOSSY)
                        set_bit(LOSSYRX, &con->state);
                con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
+               con->connect_seq++;
+               dout(10, "process_connect got READY gseq %d cseq %d (%d)\n",
+                    con->peer_global_seq,
+                    le32_to_cpu(con->in_reply.connect_seq),
+                    con->connect_seq);
                WARN_ON(con->connect_seq !=
                        le32_to_cpu(con->in_reply.connect_seq));
+
                con->delay = 0;  /* reset backoff memory */
                prepare_read_tag(con);
                break;