From: Jason Dillaman Date: Fri, 13 May 2016 20:10:11 +0000 (-0400) Subject: journal: implicitly detach future's flush handler on append X-Git-Tag: v11.0.0~518^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1cb9b1a1b25d0f4c2d9a9e22661636e195fc70a0;p=ceph.git journal: implicitly detach future's flush handler on append If the future is already in-flight, there is no purpose served by requesting the future be flushed to disk. Signed-off-by: Jason Dillaman --- diff --git a/src/journal/FutureImpl.h b/src/journal/FutureImpl.h index 5c11c4bb1050..0d5e86fbddf6 100644 --- a/src/journal/FutureImpl.h +++ b/src/journal/FutureImpl.h @@ -56,13 +56,14 @@ public: } inline void set_flush_in_progress() { Mutex::Locker locker(m_lock); + assert(m_flush_handler); + m_flush_handler.reset(); m_flush_state = FLUSH_STATE_IN_PROGRESS; } bool attach(const FlushHandlerPtr &flush_handler); inline void detach() { Mutex::Locker locker(m_lock); - assert(m_flush_handler); m_flush_handler.reset(); } inline FlushHandlerPtr get_flush_handler() const {