All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@inktank.com>
To: stable@vger.kernel.org
Cc: ceph-devel@vger.kernel.org, "Yan, Zheng" <zheng.z.yan@intel.com>,
	Sage Weil <sage@inktank.com>
Subject: [PATCH 2/4] ceph: cleanup aborted requests when re-sending requests.
Date: Mon, 30 Dec 2013 16:13:49 -0800	[thread overview]
Message-ID: <1388448831-10324-3-git-send-email-sage@inktank.com> (raw)
In-Reply-To: <1388448831-10324-1-git-send-email-sage@inktank.com>

From: "Yan, Zheng" <zheng.z.yan@intel.com>

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>
(cherry picked from commit eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79)
---
 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 b7bda5d..91214b2 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1875,8 +1875,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.5.1


  parent reply	other threads:[~2013-12-31  0:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  0:13 [PATCH 0/4] Ceph fixes for 3.12.y Sage Weil
2013-12-31  0:13 ` [PATCH 1/4] ceph: hung on ceph fscache invalidate in some cases Sage Weil
2013-12-31  0:13 ` Sage Weil [this message]
2013-12-31  0:13 ` [PATCH 3/4] ceph: wake up 'safe' waiters when unregistering request Sage Weil
2013-12-31  0:13 ` [PATCH 4/4] ceph: allocate non-zero page to fscache in readpage() Sage Weil
2013-12-31  5:15 ` [PATCH 0/4] Ceph fixes for 3.12.y Greg KH
2014-02-09 18:49   ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388448831-10324-3-git-send-email-sage@inktank.com \
    --to=sage@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=zheng.z.yan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.