diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-26 14:25:36 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-02-15 19:20:11 +0000 |
commit | b072f9cad8d6d04fea08d3aafc88e4d9e2d95959 (patch) | |
tree | 20e933a1b30abf0014924ca03b816a8587be9903 /fs | |
parent | 7f4d246009352e5c95a472fdf3fb28fb8a8bd414 (diff) |
ceph: cleanup aborted requests when re-sending requests.
commit eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
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 6203d805eb45..9b2492df4346 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1815,8 +1815,11 @@ static int __do_request(struct ceph_mds_client *mdsc, int mds = -1; int err = -EAGAIN; - if (req->r_err || req->r_got_result) + if (req->r_err || req->r_got_result) { + if (req->r_aborted) + __unregister_request(mdsc, req); goto out; + } if (req->r_timeout && time_after_eq(jiffies, req->r_started + req->r_timeout)) { |