From: samlang@gmail.com
To: ceph-devel@vger.kernel.org
Cc: Sam Lang <samlang@gmail.com>
Subject: [PATCH] client: Fix for client hang caused by connection drop to MDS.
Date: Mon, 21 Nov 2011 15:51:19 -0600 [thread overview]
Message-ID: <1321912279-15673-1-git-send-email-samlang@gmail.com> (raw)
From: Sam Lang <samlang@gmail.com>
This patch will cause inprogress client operations to the MDS server to
be kicked if the connection to the MDS server is dropped.
---
src/client/Client.cc | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/client/Client.cc b/src/client/Client.cc
index 78d12c8e..1f37dfc 100644
--- a/src/client/Client.cc
+++ b/src/client/Client.cc
@@ -6907,6 +6907,18 @@ bool Client::ms_handle_reset(Connection *con)
ldout(cct, 0) << "ms_handle_reset on " << con->get_peer_addr() << dendl;
Mutex::Locker l(client_lock);
objecter->ms_handle_reset(con);
+
+ // look for mds that has this connection and kick associated requests
+ for(map<int, MetaSession*>::iterator it = mds_sessions.begin();
+ it != mds_sessions.end();
+ it++)
+ {
+ if((*it).second->inst.addr.probably_equals(con->get_peer_addr()))
+ {
+ kick_requests((*it).first, true);
+ break;
+ }
+ }
return false;
}
--
1.7.5.4
reply other threads:[~2011-11-21 21:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1321912279-15673-1-git-send-email-samlang@gmail.com \
--to=samlang@gmail.com \
--cc=ceph-devel@vger.kernel.org \
/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.