diff options
author | Sage Weil <sage@newdream.net> | 2011-03-03 10:10:15 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-03-04 12:24:31 -0800 |
commit | e76661d0a59e53e5cc4dccbe4b755d1dc8a968ec (patch) | |
tree | 371ed08c5d00dbcdcf6f18e5cf36d798bcc51180 /net | |
parent | 60bf8bf8815e6adea4c1d0423578c3b8000e2ec8 (diff) | |
download | linux-e76661d0a59e53e5cc4dccbe4b755d1dc8a968ec.tar.gz linux-e76661d0a59e53e5cc4dccbe4b755d1dc8a968ec.tar.bz2 linux-e76661d0a59e53e5cc4dccbe4b755d1dc8a968ec.zip |
libceph: fix msgr keepalive flag
There was some broken keepalive code using a dead variable. Shift to using
the proper bit flag.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/messenger.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 46fbc422ba74..3252ea974e8f 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -336,7 +336,6 @@ 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; } @@ -2019,10 +2018,10 @@ static void ceph_fault(struct ceph_connection *con) /* Requeue anything that hasn't been acked */ list_splice_init(&con->out_sent, &con->out_queue); - /* If there are no messages in the queue, place the connection - * in a STANDBY state (i.e., don't try to reconnect just yet). */ - if (list_empty(&con->out_queue) && !con->out_keepalive_pending) { - dout("fault setting STANDBY\n"); + /* If there are no messages queued or keepalive pending, place + * the connection in a STANDBY state */ + if (list_empty(&con->out_queue) && + !test_bit(KEEPALIVE_PENDING, &con->state)) { set_bit(STANDBY, &con->state); } else { /* retry after a delay. */ |