From c2c912b99ef724ef97abb6ed0cfced3377220588 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 2 Aug 2012 09:39:08 -0700 Subject: [PATCH] FileStore: remove trigger_commit This is no longer used. Signed-off-by: Samuel Just --- src/os/FileStore.cc | 17 ----------------- src/os/FileStore.h | 2 -- src/os/JournalingObjectStore.cc | 21 --------------------- 3 files changed, 40 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index cd579ce92fb6a..b1ba601590b81 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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"); diff --git a/src/os/FileStore.h b/src/os/FileStore.h index b69415dbb1ada..a525f7f704eda 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -117,8 +117,6 @@ private: } } sync_thread; - void trigger_commit(uint64_t); - void sync_fs(); // actuall sync underlying fs // -- op workqueue -- diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc index e1e077e77513a..c0ccd44fc2c8d 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/JournalingObjectStore.cc @@ -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); -- 2.39.5