From 68f4ee62cabeac16ad3e3df0e49638709ff6bdc7 Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Tue, 28 Mar 2017 20:26:43 -0700 Subject: [PATCH] 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 --- src/os/filestore/WBThrottle.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5