ceph: clean up connection reset
authorSage Weil <sage@newdream.net>
Fri, 2 Apr 2010 23:16:34 +0000 (16:16 -0700)
committerSage Weil <sage@newdream.net>
Mon, 17 May 2010 22:25:20 +0000 (15:25 -0700)
Reset out_keepalive_pending and peer_global_seq, and drop unused var.

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

index 395ce326beda5b2105cbaaf69173eeee78e0f93d..8cfca375c6a9fb7c572aba791ff5da203c75a51b 100644 (file)
@@ -340,6 +340,7 @@ static void reset_connection(struct ceph_connection *con)
                ceph_msg_put(con->out_msg);
                con->out_msg = NULL;
        }
+       con->out_keepalive_pending = false;
        con->in_seq = 0;
        con->in_seq_acked = 0;
 }
@@ -357,6 +358,7 @@ void ceph_con_close(struct ceph_connection *con)
        clear_bit(WRITE_PENDING, &con->state);
        mutex_lock(&con->mutex);
        reset_connection(con);
+       con->peer_global_seq = 0;
        cancel_delayed_work(&con->work);
        mutex_unlock(&con->mutex);
        queue_con(con);
index 27fb69585f634d3a117203e3a3cc3b5d893e4980..e56564f7e71cf262766f450081409f7b27da1877 100644 (file)
@@ -158,7 +158,6 @@ struct ceph_connection {
        struct list_head out_queue;
        struct list_head out_sent;   /* sending or sent but unacked */
        u64 out_seq;                 /* last message queued for send */
-       u64 out_seq_sent;            /* last message sent */
        bool out_keepalive_pending;
 
        u64 in_seq, in_seq_acked;  /* last message received, acked */