[3.5.y.z extended stable] Patch "ceph: cleanup aborted requests when re-sending requests." has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Jan 8 14:20:11 UTC 2014


This is a note to let you know that I have just added a patch titled

    ceph: cleanup aborted requests when re-sending requests.

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From cba883e01e84bce99fe22e5eb4c1dc5cdf143f10 Mon Sep 17 00:00:00 2001
From: "Yan, Zheng" <zheng.z.yan at intel.com>
Date: Thu, 26 Sep 2013 14:25:36 +0800
Subject: 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 at intel.com>
Reviewed-by: Greg Farnum <greg at inktank.com>
Signed-off-by: Sage Weil <sage at inktank.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 fs/ceph/mds_client.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 0b26ea8..5efe309 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)) {
--
1.8.3.2





More information about the kernel-team mailing list