]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fixed bug in clientmap save callback
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 10 Oct 2007 18:20:34 +0000 (18:20 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 10 Oct 2007 18:20:34 +0000 (18:20 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1912 29311d96-e01e-0410-9327-a35deaab8ce9

branches/sage/mds/mds/ClientMap.cc

index 26f105d7ae1a6449f27eaa190e92ff001dc32897..5170f3fe9b3eb602404ac62c23f7574cdadb9f56 100644 (file)
@@ -96,10 +96,15 @@ public:
 void ClientMap::save(Context *onsave, version_t needv)
 {
   dout(10) << "save needv " << needv << ", v " << version << dendl;
+  if (needv && committing >= needv) {
+    assert(committing > committed);
+    commit_waiters[committing].push_back(onsave);
+    return;
+  }
+
   commit_waiters[version].push_back(onsave);
   
-  if (needv && committing >= needv) return;
-  
   bufferlist bl;
   
   init_inode();
@@ -108,7 +113,7 @@ void ClientMap::save(Context *onsave, version_t needv)
   mds->filer->write(inode,
                     0, bl.length(), bl,
                     0,
-                                       0, new C_CM_Save(this, version));
+                   0, new C_CM_Save(this, version));
 }
 
 void ClientMap::_save_finish(version_t v)