Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190810
b: refs/heads/master
c: e84346b
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed May 12, 2010
1 parent b7d26eb commit 0942067
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f818a73674c5d197f66b636a46d7d578d7258129
refs/heads/master: e84346b726ea90a8ed470bc81c4136a7b8710ea5
11 changes: 10 additions & 1 deletion trunk/fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,14 @@ static void prepare_write_message(struct ceph_connection *con)
list_move_tail(&m->list_head, &con->out_sent);
}

m->hdr.seq = cpu_to_le64(++con->out_seq);
/*
* only assign outgoing seq # if we haven't sent this message
* yet. if it is requeued, resend with it's original seq.
*/
if (m->needs_out_seq) {
m->hdr.seq = cpu_to_le64(++con->out_seq);
m->needs_out_seq = false;
}

dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n",
m, con->out_seq, le16_to_cpu(m->hdr.type),
Expand Down Expand Up @@ -1986,6 +1993,8 @@ void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg)

BUG_ON(msg->front.iov_len != le32_to_cpu(msg->hdr.front_len));

msg->needs_out_seq = true;

/* queue */
mutex_lock(&con->mutex);
BUG_ON(!list_empty(&msg->list_head));
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ceph/messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct ceph_msg {
struct kref kref;
bool front_is_vmalloc;
bool more_to_follow;
bool needs_out_seq;
int front_max;

struct ceph_msgpool *pool;
Expand Down

0 comments on commit 0942067

Please sign in to comment.