Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e76661d0 authored by Sage Weil's avatar Sage Weil
Browse files

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: default avatarSage Weil <sage@newdream.net>
parent 60bf8bf8
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -161,7 +161,6 @@ struct ceph_connection {
	struct list_head out_queue;
	struct list_head out_queue;
	struct list_head out_sent;   /* sending or sent but unacked */
	struct list_head out_sent;   /* sending or sent but unacked */
	u64 out_seq;		     /* last message queued for send */
	u64 out_seq;		     /* last message queued for send */
	bool out_keepalive_pending;


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


+4 −5
Original line number Original line Diff line number Diff line
@@ -336,7 +336,6 @@ static void reset_connection(struct ceph_connection *con)
		ceph_msg_put(con->out_msg);
		ceph_msg_put(con->out_msg);
		con->out_msg = NULL;
		con->out_msg = NULL;
	}
	}
	con->out_keepalive_pending = false;
	con->in_seq = 0;
	con->in_seq = 0;
	con->in_seq_acked = 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 */
	/* Requeue anything that hasn't been acked */
	list_splice_init(&con->out_sent, &con->out_queue);
	list_splice_init(&con->out_sent, &con->out_queue);


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