]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: kill out_qlen
authorSage Weil <sage@newdream.net>
Tue, 22 Sep 2009 18:27:32 +0000 (11:27 -0700)
committerSage Weil <sage@newdream.net>
Tue, 22 Sep 2009 18:27:32 +0000 (11:27 -0700)
This is apparently buggy (not immediately obvious why) but it's
only really useful for debugging anyway (it makes it easier to
match up message sequence numbers).  Rip it out.

src/kernel/messenger.c
src/kernel/messenger.h

index 49150422a0332d78a761d67f383be5a3a4bd0bf8..14771e54237f2f44e2b62612711adca08f06b5c2 100644 (file)
@@ -251,7 +251,6 @@ static void reset_connection(struct ceph_connection *con)
 
        con->connect_seq = 0;
        con->out_seq = 0;
-       con->out_qlen = 0;
        con->out_msg = NULL;
        con->in_seq = 0;
        mutex_unlock(&con->out_mutex);
@@ -396,9 +395,6 @@ static void prepare_write_message(struct ceph_connection *con)
        list_move_tail(&m->list_head, &con->out_sent);
        con->out_msg = m;   /* we don't bother taking a reference here. */
 
-       BUG_ON(!con->out_qlen);
-       con->out_qlen--;
-
        m->hdr.seq = cpu_to_le64(++con->out_seq);
 
        dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n",
@@ -1658,9 +1654,7 @@ void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg)
        /* queue */
        mutex_lock(&con->out_mutex);
        list_add_tail(&msg->list_head, &con->out_queue);
-       con->out_qlen++;
-       dout("----- %p %llu to %s%lld %d=%s len %d+%d+%d -----\n", msg,
-            con->out_seq + con->out_qlen,
+       dout("----- %p to %s%lld %d=%s len %d+%d+%d -----\n", msg,
             ENTITY_NAME(con->peer_name), le16_to_cpu(msg->hdr.type),
             ceph_msg_type_name(le16_to_cpu(msg->hdr.type)),
             le32_to_cpu(msg->hdr.front_len),
@@ -1684,10 +1678,7 @@ void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg)
                dout("con_revoke %p msg %p\n", con, msg);
                list_del_init(&msg->list_head);
                ceph_msg_put(msg);
-               if (msg->hdr.seq == 0)
-                       con->out_qlen--;
-               else
-                       msg->hdr.seq = 0;
+               msg->hdr.seq = 0;
                if (con->out_msg == msg)
                        con->out_msg = NULL;
                if (con->out_kvec_is_msg) {
index 613313a045024a0be2abaf6cba222806b675ca52..55cd4376f30169ca40d72237e5609ec7630018f4 100644 (file)
@@ -165,7 +165,6 @@ struct ceph_connection {
        struct mutex out_mutex;
        struct list_head out_queue;
        struct list_head out_sent;   /* sending or sent but unacked */
-       unsigned out_qlen;
        u64 out_seq;                 /* last message queued for send */
        u64 out_seq_sent;            /* last message sent */
        bool out_keepalive_pending;