aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-23 17:02:44 -0500
committerSage Weil <sage@newdream.net>2010-02-23 17:26:36 -0500
commita1ea787c7b6ec036d169d84e08cca7b6e399ba70 (patch)
tree99eeb4be56e747593d6da388a8b92530f0188768 /fs
parent2600d2dd5085ab6fb09540226138a60055abf335 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 4d00ea2af000..bec8a7aeb300 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1896,17 +1896,15 @@ static void handle_forward(struct ceph_mds_client *mdsc,
1896 struct ceph_msg *msg) 1896 struct ceph_msg *msg)
1897{ 1897{
1898 struct ceph_mds_request *req; 1898 struct ceph_mds_request *req;
1899 u64 tid; 1899 u64 tid = le64_to_cpu(msg->hdr.tid);
1900 u32 next_mds; 1900 u32 next_mds;
1901 u32 fwd_seq; 1901 u32 fwd_seq;
1902 u8 must_resend; 1902 u8 must_resend;
1903 int err = -EINVAL; 1903 int err = -EINVAL;
1904 void *p = msg->front.iov_base; 1904 void *p = msg->front.iov_base;
1905 void *end = p + msg->front.iov_len; 1905 void *end = p + msg->front.iov_len;
1906 int state;
1907 1906
1908 ceph_decode_need(&p, end, sizeof(u64)+2*sizeof(u32), bad); 1907 ceph_decode_need(&p, end, 2*sizeof(u32), bad);
1909 tid = ceph_decode_64(&p);
1910 next_mds = ceph_decode_32(&p); 1908 next_mds = ceph_decode_32(&p);
1911 fwd_seq = ceph_decode_32(&p); 1909 fwd_seq = ceph_decode_32(&p);
1912 must_resend = ceph_decode_8(&p); 1910 must_resend = ceph_decode_8(&p);
@@ -1920,10 +1918,6 @@ static void handle_forward(struct ceph_mds_client *mdsc,
1920 goto out; /* dup reply? */ 1918 goto out; /* dup reply? */
1921 } 1919 }
1922 1920
1923 if (next_mds >= mdsc->max_sessions)
1924 goto out;
1925
1926 state = mdsc->sessions[next_mds]->s_state;
1927 if (fwd_seq <= req->r_num_fwd) { 1921 if (fwd_seq <= req->r_num_fwd) {
1928 dout("forward %llu to mds%d - old seq %d <= %d\n", 1922 dout("forward %llu to mds%d - old seq %d <= %d\n",
1929 tid, next_mds, req->r_num_fwd, fwd_seq); 1923 tid, next_mds, req->r_num_fwd, fwd_seq);