From: Xiaoxi Chen Date: Wed, 29 Mar 2017 03:26:43 +0000 (-0700) Subject: os/Filestore: fix wbthrottle assert. X-Git-Tag: v13.0.1~507^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=68f4ee62cabeac16ad3e3df0e49638709ff6bdc7;p=ceph.git os/Filestore: fix wbthrottle assert. When filestore_wbthrottle_*_*_start_flusher = 0, ceph-osd will assert on startup due to pending_wbs.empty() == True. It seems valid for user to set start_flusher to 0 as intend to flush aggressively all the time, to minimize the impact of syncfs(). Signed-off-by: Xiaoxi Chen --- diff --git a/src/os/filestore/WBThrottle.cc b/src/os/filestore/WBThrottle.cc index 71884445c76..9287715acd4 100644 --- a/src/os/filestore/WBThrottle.cc +++ b/src/os/filestore/WBThrottle.cc @@ -135,7 +135,7 @@ bool WBThrottle::get_next_should_flush( { assert(lock.is_locked()); assert(next); - while (!stopping && !beyond_limit()) + while (!stopping && (!beyond_limit() || pending_wbs.empty())) cond.Wait(lock); if (stopping) return false;