con->connect_seq = 0;
con->out_seq = 0;
- con->out_qlen = 0;
con->out_msg = NULL;
con->in_seq = 0;
mutex_unlock(&con->out_mutex);
list_move_tail(&m->list_head, &con->out_sent);
con->out_msg = m; /* we don't bother taking a reference here. */
- BUG_ON(!con->out_qlen);
- con->out_qlen--;
-
m->hdr.seq = cpu_to_le64(++con->out_seq);
dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n",
/* queue */
mutex_lock(&con->out_mutex);
list_add_tail(&msg->list_head, &con->out_queue);
- con->out_qlen++;
- dout("----- %p %llu to %s%lld %d=%s len %d+%d+%d -----\n", msg,
- con->out_seq + con->out_qlen,
+ dout("----- %p to %s%lld %d=%s len %d+%d+%d -----\n", msg,
ENTITY_NAME(con->peer_name), le16_to_cpu(msg->hdr.type),
ceph_msg_type_name(le16_to_cpu(msg->hdr.type)),
le32_to_cpu(msg->hdr.front_len),
dout("con_revoke %p msg %p\n", con, msg);
list_del_init(&msg->list_head);
ceph_msg_put(msg);
- if (msg->hdr.seq == 0)
- con->out_qlen--;
- else
- msg->hdr.seq = 0;
+ msg->hdr.seq = 0;
if (con->out_msg == msg)
con->out_msg = NULL;
if (con->out_kvec_is_msg) {
struct mutex out_mutex;
struct list_head out_queue;
struct list_head out_sent; /* sending or sent but unacked */
- unsigned out_qlen;
u64 out_seq; /* last message queued for send */
u64 out_seq_sent; /* last message sent */
bool out_keepalive_pending;