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

Commit 6c5d1a49 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: fix msgr to keep sent messages until acked



The test was backwards from commit b3d1dbbd: keep the message if the
connection _isn't_ lossy.  This allows the client to continue when the
TCP connection drops for some reason (network glitch) but both ends
survive.

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 80310491
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -463,11 +463,11 @@ static void prepare_write_message(struct ceph_connection *con)
		       struct ceph_msg, list_head);
	con->out_msg = m;
	if (test_bit(LOSSYTX, &con->state)) {
		list_del_init(&m->list_head);
	} else {
		/* put message on sent list */
		ceph_msg_get(m);
		list_move_tail(&m->list_head, &con->out_sent);
	} else {
		list_del_init(&m->list_head);
	}

	m->hdr.seq = cpu_to_le64(++con->out_seq);