ceph: fix client_request_forward decoding
The tid is in the message header, not body. Broken since 6df058c0
.
No need to look at next mds session; just mark the request and be done.
(The old error path was broken too, but now it's gone.)
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
2600d2dd50
commit
a1ea787c7b
1 changed files with 2 additions and 8 deletions
|
@ -1896,17 +1896,15 @@ static void handle_forward(struct ceph_mds_client *mdsc,
|
||||||
struct ceph_msg *msg)
|
struct ceph_msg *msg)
|
||||||
{
|
{
|
||||||
struct ceph_mds_request *req;
|
struct ceph_mds_request *req;
|
||||||
u64 tid;
|
u64 tid = le64_to_cpu(msg->hdr.tid);
|
||||||
u32 next_mds;
|
u32 next_mds;
|
||||||
u32 fwd_seq;
|
u32 fwd_seq;
|
||||||
u8 must_resend;
|
u8 must_resend;
|
||||||
int err = -EINVAL;
|
int err = -EINVAL;
|
||||||
void *p = msg->front.iov_base;
|
void *p = msg->front.iov_base;
|
||||||
void *end = p + msg->front.iov_len;
|
void *end = p + msg->front.iov_len;
|
||||||
int state;
|
|
||||||
|
|
||||||
ceph_decode_need(&p, end, sizeof(u64)+2*sizeof(u32), bad);
|
ceph_decode_need(&p, end, 2*sizeof(u32), bad);
|
||||||
tid = ceph_decode_64(&p);
|
|
||||||
next_mds = ceph_decode_32(&p);
|
next_mds = ceph_decode_32(&p);
|
||||||
fwd_seq = ceph_decode_32(&p);
|
fwd_seq = ceph_decode_32(&p);
|
||||||
must_resend = ceph_decode_8(&p);
|
must_resend = ceph_decode_8(&p);
|
||||||
|
@ -1920,10 +1918,6 @@ static void handle_forward(struct ceph_mds_client *mdsc,
|
||||||
goto out; /* dup reply? */
|
goto out; /* dup reply? */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (next_mds >= mdsc->max_sessions)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
state = mdsc->sessions[next_mds]->s_state;
|
|
||||||
if (fwd_seq <= req->r_num_fwd) {
|
if (fwd_seq <= req->r_num_fwd) {
|
||||||
dout("forward %llu to mds%d - old seq %d <= %d\n",
|
dout("forward %llu to mds%d - old seq %d <= %d\n",
|
||||||
tid, next_mds, req->r_num_fwd, fwd_seq);
|
tid, next_mds, req->r_num_fwd, fwd_seq);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue