aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-13 23:29:31 -0500
committerSage Weil <sage@newdream.net>2010-02-13 23:29:31 -0500
commit6c5d1a49e5e88ee831117f4b2375829933ad15da (patch)
treeb96f9e7b77d7adfd763cb1089fc0e414605c361e /fs
parent8031049147c58d9d8b6226c3ac31a9d72d053e25 (diff)
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: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/messenger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index c4341784ec8f..44bdaf439924 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -463,11 +463,11 @@ static void prepare_write_message(struct ceph_connection *con)
463 struct ceph_msg, list_head); 463 struct ceph_msg, list_head);
464 con->out_msg = m; 464 con->out_msg = m;
465 if (test_bit(LOSSYTX, &con->state)) { 465 if (test_bit(LOSSYTX, &con->state)) {
466 list_del_init(&m->list_head);
467 } else {
466 /* put message on sent list */ 468 /* put message on sent list */
467 ceph_msg_get(m); 469 ceph_msg_get(m);
468 list_move_tail(&m->list_head, &con->out_sent); 470 list_move_tail(&m->list_head, &con->out_sent);
469 } else {
470 list_del_init(&m->list_head);
471 } 471 }
472 472
473 m->hdr.seq = cpu_to_le64(++con->out_seq); 473 m->hdr.seq = cpu_to_le64(++con->out_seq);