diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-26 02:25:36 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-11-23 14:01:04 -0500 |
commit | eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79 (patch) | |
tree | bfcabbe9697759b719e6b4b49b99e02e8e8de030 /fs | |
parent | 99a9c273b94a087f8feaec6c5ffbe3205a2dbe51 (diff) |
ceph: cleanup aborted requests when re-sending requests.
Aborted requests usually get cleared when the reply is received.
If MDS crashes, no reply will be received. So we need to cleanup
aborted requests when re-sending requests.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/mds_client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 6d953ab0ac06..8ef79266d064 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1872,8 +1872,11 @@ static int __do_request(struct ceph_mds_client *mdsc, | |||
1872 | int mds = -1; | 1872 | int mds = -1; |
1873 | int err = -EAGAIN; | 1873 | int err = -EAGAIN; |
1874 | 1874 | ||
1875 | if (req->r_err || req->r_got_result) | 1875 | if (req->r_err || req->r_got_result) { |
1876 | if (req->r_aborted) | ||
1877 | __unregister_request(mdsc, req); | ||
1876 | goto out; | 1878 | goto out; |
1879 | } | ||
1877 | 1880 | ||
1878 | if (req->r_timeout && | 1881 | if (req->r_timeout && |
1879 | time_after_eq(jiffies, req->r_started + req->r_timeout)) { | 1882 | time_after_eq(jiffies, req->r_started + req->r_timeout)) { |