From 11eecce5f5d6c4b78771f7ec6a6d6e397e108667 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 22 Jul 2011 08:19:30 -0700 Subject: [PATCH] client: fix stalls on racing revocations can cap migrations Signed-off-by: Sage Weil --- src/client/Client.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 25b2714475bb0..c627c4a611041 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2860,9 +2860,6 @@ void Client::handle_cap_export(Inode *in, MClientCaps *m) in->exporting_issued = cap->issued; in->exporting_mseq = m->get_mseq(); in->exporting_mds = mds; - - // open export targets, so we'll get the matching IMPORT - connect_mds_targets(mds); } else ldout(cct, 5) << "handle_cap_export ino " << m->get_ino() << " mseq " << m->get_mseq() << " EXPORT from mds" << mds @@ -2872,6 +2869,11 @@ void Client::handle_cap_export(Inode *in, MClientCaps *m) } // else we already released it + // open export targets, so we'll get the matching IMPORT, even if we + // have seen a newer import (or have released the cap entirely), as there + // may be an intervening revocation that will otherwise get blocked up. + connect_mds_targets(mds); + m->put(); } -- 2.39.5