Skip to content

Commit

Permalink
ceph: fix msgr to keep sent messages until acked
Browse files Browse the repository at this point in the history
The test was backwards from commit b3d1dbb: 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: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Feb 14, 2010
1 parent 8031049 commit 6c5d1a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6c5d1a4

Please sign in to comment.