summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-05-29 15:05:51 -0700
committerSamuel Just <sam.just@inktank.com>2013-05-29 15:05:51 -0700
commita55e03cdfe45754b2aff8110aa1a0518404f1218 (patch)
treedc6d183d889dd9f0b6ba0064f9057e05e5e23d30
parent4b31c7e7929bffa530ded0a695c25f8c1b0f7774 (diff)
downloadceph-a55e03cdfe45754b2aff8110aa1a0518404f1218.tar.gz
WBThrottle: add some comments and some asserts
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/os/WBThrottle.cc2
-rw-r--r--src/os/WBThrottle.h4
2 files changed, 6 insertions, 0 deletions
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<uint64_t, uint64_t> size_limits;