aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-09-26 02:25:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 15:24:19 -0500
commit2c460e835ceecda4b327aacb6423b54f9a89042f (patch)
tree7fea73024a38c549b4b5324c84fdc528cfc62241 /fs
parentd07732a871f6f0906c012e89e2a10edb3c9be3b4 (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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 4d2920304be8..0af8e298d5b9 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1840,8 +1840,11 @@ static int __do_request(struct ceph_mds_client *mdsc,
1840 int mds = -1; 1840 int mds = -1;
1841 int err = -EAGAIN; 1841 int err = -EAGAIN;
1842 1842
1843 if (req->r_err || req->r_got_result) 1843 if (req->r_err || req->r_got_result) {
1844 if (req->r_aborted)
1845 __unregister_request(mdsc, req);
1844 goto out; 1846 goto out;
1847 }
1845 1848
1846 if (req->r_timeout && 1849 if (req->r_timeout &&
1847 time_after_eq(jiffies, req->r_started + req->r_timeout)) { 1850 time_after_eq(jiffies, req->r_started + req->r_timeout)) {