]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix stalls on racing revocations can cap migrations
authorSage Weil <sage.weil@dreamhost.com>
Fri, 22 Jul 2011 15:19:30 +0000 (08:19 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 22 Jul 2011 15:19:30 +0000 (08:19 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/client/Client.cc

index 25b2714475bb04ba3463d551fdb3b62162acfb59..c627c4a611041d3b7aa1e3a0e8ada7e74c12414c 100644 (file)
@@ -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();
 }