]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
uclient: reset flushing_caps on (mds) cap import.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 2 Jun 2011 21:27:23 +0000 (14:27 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 3 Jun 2011 01:35:45 +0000 (18:35 -0700)
Previously, we could get stuck thinking that we'd flushed caps
(that went to the original MDS, waited on freeze for export,
and then were dropped) without ever telling the auth MDS that we
wanted to do so. This caused hung shutdowns:
1) during shutdown we drop all our caps
2) we get stuck and notice that we have a flushing cap
3) we send cap flush
4) MDS ignores it (I think because actual data already got updated?
and now we don't have the proper caps either)

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/client/Client.cc

index 028b51a03f7895880270d610876a8da60a8156c1..1207460e7deffeda494fb90b1d363efb7bf87c63 100644 (file)
@@ -2736,6 +2736,13 @@ void Client::handle_cap_import(Inode *in, MClientCaps *m)
                 m->get_caps(), m->get_seq(), m->get_mseq(), m->get_realm(),
                 CEPH_CAP_FLAG_AUTH);
   
+  // clear out the flushing caps so they get resent
+  if (in->flushing_caps) {
+    in->dirty_caps |= in->flushing_caps;
+    in->flushing_caps = 0;
+    in->put();
+  }
+
   if (m->get_mseq() > in->exporting_mseq) {
     dout(5) << "handle_cap_import ino " << m->get_ino() << " mseq " << m->get_mseq()
            << " IMPORT from mds" << mds