Skip to content

Commit eb1b8af

Browse files
Yan, ZhengSage Weil
authored andcommitted
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>
1 parent 99a9c27 commit eb1b8af

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎fs/ceph/mds_client.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,8 +1872,11 @@ static int __do_request(struct ceph_mds_client *mdsc,
18721872
int mds = -1;
18731873
int err = -EAGAIN;
18741874

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);
18761878
goto out;
1879+
}
18771880

18781881
if (req->r_timeout &&
18791882
time_after_eq(jiffies, req->r_started + req->r_timeout)) {

0 commit comments

Comments
 (0)