]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: flush log on talbeserver prepare, but not commit or server_update
authorSage Weil <sage@newdream.net>
Tue, 17 Mar 2009 20:04:06 +0000 (13:04 -0700)
committerSage Weil <sage@newdream.net>
Tue, 17 Mar 2009 20:11:46 +0000 (13:11 -0700)
src/mds/MDCache.cc
src/mds/MDSTableServer.cc

index 2e7a4321a4ac99a20ce21cb1da2da1b38fba196b..2591a06cd5a551fb5d49223077d3fa7efd3f8819 100644 (file)
@@ -6280,6 +6280,7 @@ void MDCache::_anchor_prepared(CInode *in, version_t atid, bool add)
   journal_dirty_inode(mut, &le->metablob, in);
   le->metablob.add_table_transaction(TABLE_ANCHOR, atid);
   mds->mdlog->submit_entry(le, new C_MDC_AnchorLogged(this, in, atid, mut));
+  mds->mdlog->flush();
 }
 
 
index c1976264a23df02dfae924caa4071be4b4c1e8b3..999df03cb0af616af8d03a70596db71ef896e1fd 100644 (file)
@@ -53,6 +53,7 @@ void MDSTableServer::handle_prepare(MMDSTableRequest *req)
   ETableServer *le = new ETableServer(table, TABLESERVER_OP_PREPARE, req->reqid, from, version, version);
   le->mutation = bl;  // original request, NOT modified return value coming out of _prepare!
   mds->mdlog->submit_entry(le, new C_Prepare(this, req, version));
+  mds->mdlog->flush();
 }
 
 void MDSTableServer::_prepare_logged(MMDSTableRequest *req, version_t tid)
@@ -78,7 +79,6 @@ void MDSTableServer::handle_commit(MMDSTableRequest *req)
     pending_for_mds.erase(tid);
     mds->mdlog->submit_entry(new ETableServer(table, TABLESERVER_OP_COMMIT, 0, -1, tid, version));
     mds->mdlog->wait_for_sync(new C_Commit(this, req));
-    mds->mdlog->flush();
   }
   else if (tid <= version) {
     dout(0) << "got commit for tid " << tid << " <= " << version