]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: remove trigger_commit
authorSamuel Just <sam.just@inktank.com>
Thu, 2 Aug 2012 16:39:08 +0000 (09:39 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 30 Oct 2012 20:31:09 +0000 (13:31 -0700)
This is no longer used.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/os/FileStore.cc
src/os/FileStore.h
src/os/JournalingObjectStore.cc

index cd579ce92fb6ae94819f2c170b79c24c34db1f27..b1ba601590b81cf96ed7032186d3be4a371e822c 100644 (file)
@@ -3837,23 +3837,6 @@ void FileStore::start_sync(Context *onsafe)
   dout(10) << "start_sync" << dendl;
 }
 
-void FileStore::trigger_commit(uint64_t seq)
-{
-  /*
-   * crib the lock -> journal_lock.  we need to start the sync under lock,
-   * but once we release lock it will block because journal_lock is held.
-   * _trigger_commit() expects journal_lock to be held by the caller.
-   */
-  lock.Lock();
-  dout(10) << "trigger_commit seq" << dendl;
-  force_sync = true;
-  sync_cond.Signal();
-  journal_lock.Lock();
-  lock.Unlock();
-  _trigger_commit(seq);
-  journal_lock.Unlock();
-}
-
 void FileStore::sync()
 {
   Mutex l("FileStore::sync");
index b69415dbb1ada1b3f5e94424a8f3ba4de9bc487d..a525f7f704eda694b47e7d38258181965ebf08ac 100644 (file)
@@ -117,8 +117,6 @@ private:
     }
   } sync_thread;
 
-  void trigger_commit(uint64_t);
-
   void sync_fs(); // actuall sync underlying fs
 
   // -- op workqueue --
index e1e077e77513af68180a59c3119480f5c4728025..c0ccd44fc2c8d8691003108f8510c9e83b950a0e 100644 (file)
@@ -188,26 +188,6 @@ void JournalingObjectStore::op_submit_finish(uint64_t op)
 
 // ------------------------------------------
 
-/*
- * this may (will generally) get called by an op_queue thread holding
- * an open_ops reference.  it should block only long enough for the
- * commit to _start_ waiting for open_ops, but not longer or else we
- * will deadlock.
- *
- * caller must hold journal_lock.
- */
-void JournalingObjectStore::_trigger_commit(uint64_t seq)
-{
-  assert(journal_lock.is_locked());
-  dout(10) << "trigger_commit " << seq << dendl;
-  force_commit = true;
-  while (!blocked && committing_seq < seq) {
-    dout(20) << "trigger_commit not blocked and seq " << seq << " > committing " << committing_seq << dendl;
-    cond.Wait(journal_lock);
-  }
-  dout(10) << "trigger_commit triggered, will commit something >= " << seq << dendl;
-}
-
 bool JournalingObjectStore::commit_start() 
 {
   bool ret = false;
@@ -217,7 +197,6 @@ bool JournalingObjectStore::commit_start()
           << ", applied_seq " << applied_seq
           << ", committed_seq " << committed_seq << dendl;
   blocked = true;
-  cond.Signal();  // for trigger_commit() caller
   while (open_ops > 0) {
     dout(10) << "commit_start blocked, waiting for " << open_ops << " open ops" << dendl;
     cond.Wait(journal_lock);