All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] client: Fix for client hang caused by connection drop to MDS.
@ 2011-11-21 21:51 samlang
  0 siblings, 0 replies; only message in thread
From: samlang @ 2011-11-21 21:51 UTC (permalink / raw)
  To: ceph-devel; +Cc: Sam Lang

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-21 21:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 21:51 [PATCH] client: Fix for client hang caused by connection drop to MDS samlang

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.