Skip to content

Commit e76661d

Browse files
committed
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>
1 parent 60bf8bf commit e76661d

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎include/linux/ceph/messenger.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ struct ceph_connection {
161161
struct list_head out_queue;
162162
struct list_head out_sent; /* sending or sent but unacked */
163163
u64 out_seq; /* last message queued for send */
164-
bool out_keepalive_pending;
165164

166165
u64 in_seq, in_seq_acked; /* last message received, acked */
167166

‎net/ceph/messenger.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ static void reset_connection(struct ceph_connection *con)
336336
ceph_msg_put(con->out_msg);
337337
con->out_msg = NULL;
338338
}
339-
con->out_keepalive_pending = false;
340339
con->in_seq = 0;
341340
con->in_seq_acked = 0;
342341
}
@@ -2019,10 +2018,10 @@ static void ceph_fault(struct ceph_connection *con)
20192018
/* Requeue anything that hasn't been acked */
20202019
list_splice_init(&con->out_sent, &con->out_queue);
20212020

2022-
/* If there are no messages in the queue, place the connection
2023-
* in a STANDBY state (i.e., don't try to reconnect just yet). */
2024-
if (list_empty(&con->out_queue) && !con->out_keepalive_pending) {
2025-
dout("fault setting STANDBY\n");
2021+
/* If there are no messages queued or keepalive pending, place
2022+
* the connection in a STANDBY state */
2023+
if (list_empty(&con->out_queue) &&
2024+
!test_bit(KEEPALIVE_PENDING, &con->state)) {
20262025
set_bit(STANDBY, &con->state);
20272026
} else {
20282027
/* retry after a delay. */

0 commit comments

Comments
 (0)