]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
WBThrottle: add some comments and some asserts
authorSamuel Just <sam.just@inktank.com>
Wed, 29 May 2013 22:05:51 +0000 (15:05 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 29 May 2013 22:05:51 +0000 (15:05 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/os/WBThrottle.cc
src/os/WBThrottle.h

index 23e24765cc2424e06d58d10368ad882e5d35f70f..4673488f833482751635eddfb0469e0c57697f9f 100644 (file)
@@ -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)
index 797a6e78246ba4600e3c719c0c0891ca988c9c69..070de08e1230bd8cebef5b84b9c6164d1df80824 100644 (file)
@@ -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;