From a55e03cdfe45754b2aff8110aa1a0518404f1218 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 29 May 2013 15:05:51 -0700 Subject: WBThrottle: add some comments and some asserts Signed-off-by: Samuel Just --- src/os/WBThrottle.cc | 2 ++ src/os/WBThrottle.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/os/WBThrottle.cc b/src/os/WBThrottle.cc index 23e24765cc2..4673488f833 100644 --- a/src/os/WBThrottle.cc +++ b/src/os/WBThrottle.cc @@ -206,6 +206,8 @@ void WBThrottle::clear() lru.clear(); rev_lru.clear(); cond.Signal(); + assert(cur_ios == 0); + assert(cur_size == 0); } void WBThrottle::clear_object(const hobject_t &hoid) diff --git a/src/os/WBThrottle.h b/src/os/WBThrottle.h index 797a6e78246..070de08e123 100644 --- a/src/os/WBThrottle.h +++ b/src/os/WBThrottle.h @@ -46,6 +46,10 @@ enum { class WBThrottle : Thread, public md_config_obs_t { hobject_t clearing; + /* *_limits.first is the start_flusher limit and + * *_limits.second is the hard limit + */ + /// Limits on unflushed bytes pair size_limits; -- cgit v1.2.1