diff options
Diffstat (limited to 'fs/ceph/mds_client.c')
| -rw-r--r-- | fs/ceph/mds_client.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 92a2548278fc..bad07c09f91e 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
| @@ -1904,6 +1904,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, | |||
| 1904 | req->r_tid, ceph_mds_op_name(req->r_op), req->r_attempts); | 1904 | req->r_tid, ceph_mds_op_name(req->r_op), req->r_attempts); |
| 1905 | 1905 | ||
| 1906 | if (req->r_got_unsafe) { | 1906 | if (req->r_got_unsafe) { |
| 1907 | void *p; | ||
| 1907 | /* | 1908 | /* |
| 1908 | * Replay. Do not regenerate message (and rebuild | 1909 | * Replay. Do not regenerate message (and rebuild |
| 1909 | * paths, etc.); just use the original message. | 1910 | * paths, etc.); just use the original message. |
| @@ -1924,8 +1925,13 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, | |||
| 1924 | 1925 | ||
| 1925 | /* remove cap/dentry releases from message */ | 1926 | /* remove cap/dentry releases from message */ |
| 1926 | rhead->num_releases = 0; | 1927 | rhead->num_releases = 0; |
| 1927 | msg->hdr.front_len = cpu_to_le32(req->r_request_release_offset); | 1928 | |
| 1928 | msg->front.iov_len = req->r_request_release_offset; | 1929 | /* time stamp */ |
| 1930 | p = msg->front.iov_base + req->r_request_release_offset; | ||
| 1931 | ceph_encode_copy(&p, &req->r_stamp, sizeof(req->r_stamp)); | ||
| 1932 | |||
| 1933 | msg->front.iov_len = p - msg->front.iov_base; | ||
| 1934 | msg->hdr.front_len = cpu_to_le32(msg->front.iov_len); | ||
| 1929 | return 0; | 1935 | return 0; |
| 1930 | } | 1936 | } |
| 1931 | 1937 | ||
| @@ -2061,11 +2067,12 @@ static void __wake_requests(struct ceph_mds_client *mdsc, | |||
| 2061 | static void kick_requests(struct ceph_mds_client *mdsc, int mds) | 2067 | static void kick_requests(struct ceph_mds_client *mdsc, int mds) |
| 2062 | { | 2068 | { |
| 2063 | struct ceph_mds_request *req; | 2069 | struct ceph_mds_request *req; |
| 2064 | struct rb_node *p; | 2070 | struct rb_node *p = rb_first(&mdsc->request_tree); |
| 2065 | 2071 | ||
| 2066 | dout("kick_requests mds%d\n", mds); | 2072 | dout("kick_requests mds%d\n", mds); |
| 2067 | for (p = rb_first(&mdsc->request_tree); p; p = rb_next(p)) { | 2073 | while (p) { |
| 2068 | req = rb_entry(p, struct ceph_mds_request, r_node); | 2074 | req = rb_entry(p, struct ceph_mds_request, r_node); |
| 2075 | p = rb_next(p); | ||
| 2069 | if (req->r_got_unsafe) | 2076 | if (req->r_got_unsafe) |
| 2070 | continue; | 2077 | continue; |
| 2071 | if (req->r_session && | 2078 | if (req->r_session && |
| @@ -2248,6 +2255,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) | |||
| 2248 | */ | 2255 | */ |
| 2249 | if (result == -ESTALE) { | 2256 | if (result == -ESTALE) { |
| 2250 | dout("got ESTALE on request %llu", req->r_tid); | 2257 | dout("got ESTALE on request %llu", req->r_tid); |
| 2258 | req->r_resend_mds = -1; | ||
| 2251 | if (req->r_direct_mode != USE_AUTH_MDS) { | 2259 | if (req->r_direct_mode != USE_AUTH_MDS) { |
| 2252 | dout("not using auth, setting for that now"); | 2260 | dout("not using auth, setting for that now"); |
| 2253 | req->r_direct_mode = USE_AUTH_MDS; | 2261 | req->r_direct_mode = USE_AUTH_MDS; |
