Commit b3d1dbbd authored by Sage Weil's avatar Sage Weil

ceph: don't save sent messages on lossy connections

For lossy connections we drop all state on socket errors, so there is no
reason to keep sent ceph_msg's around.
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 92ac41d0
...@@ -453,12 +453,16 @@ static void prepare_write_message(struct ceph_connection *con) ...@@ -453,12 +453,16 @@ static void prepare_write_message(struct ceph_connection *con)
con->out_kvec_bytes = 1 + sizeof(con->out_temp_ack); con->out_kvec_bytes = 1 + sizeof(con->out_temp_ack);
} }
/* move message to sending/sent list */
m = list_first_entry(&con->out_queue, m = list_first_entry(&con->out_queue,
struct ceph_msg, list_head); struct ceph_msg, list_head);
con->out_msg = m; con->out_msg = m;
ceph_msg_get(m); if (test_bit(LOSSYTX, &con->state)) {
list_move_tail(&m->list_head, &con->out_sent); /* 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); m->hdr.seq = cpu_to_le64(++con->out_seq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment