diff options
| -rw-r--r-- | fs/ceph/mds_client.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 5a88b7bb3798..b49f12822cbc 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
| @@ -2014,16 +2014,21 @@ static void handle_forward(struct ceph_mds_client *mdsc, | |||
| 2014 | mutex_lock(&mdsc->mutex); | 2014 | mutex_lock(&mdsc->mutex); |
| 2015 | req = __lookup_request(mdsc, tid); | 2015 | req = __lookup_request(mdsc, tid); |
| 2016 | if (!req) { | 2016 | if (!req) { |
| 2017 | dout("forward %llu to mds%d - req dne\n", tid, next_mds); | 2017 | dout("forward tid %llu to mds%d - req dne\n", tid, next_mds); |
| 2018 | goto out; /* dup reply? */ | 2018 | goto out; /* dup reply? */ |
| 2019 | } | 2019 | } |
| 2020 | 2020 | ||
| 2021 | if (fwd_seq <= req->r_num_fwd) { | 2021 | if (req->r_aborted) { |
| 2022 | dout("forward %llu to mds%d - old seq %d <= %d\n", | 2022 | dout("forward tid %llu aborted, unregistering\n", tid); |
| 2023 | __unregister_request(mdsc, req); | ||
| 2024 | } else if (fwd_seq <= req->r_num_fwd) { | ||
| 2025 | dout("forward tid %llu to mds%d - old seq %d <= %d\n", | ||
| 2023 | tid, next_mds, req->r_num_fwd, fwd_seq); | 2026 | tid, next_mds, req->r_num_fwd, fwd_seq); |
| 2024 | } else { | 2027 | } else { |
| 2025 | /* resend. forward race not possible; mds would drop */ | 2028 | /* resend. forward race not possible; mds would drop */ |
| 2026 | dout("forward %llu to mds%d (we resend)\n", tid, next_mds); | 2029 | dout("forward tid %llu to mds%d (we resend)\n", tid, next_mds); |
| 2030 | BUG_ON(req->r_err); | ||
| 2031 | BUG_ON(req->r_got_result); | ||
| 2027 | req->r_num_fwd = fwd_seq; | 2032 | req->r_num_fwd = fwd_seq; |
| 2028 | req->r_resend_mds = next_mds; | 2033 | req->r_resend_mds = next_mds; |
| 2029 | put_request_session(req); | 2034 | put_request_session(req); |
