]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CrushWrapper: dump tunables along with crush map
authorDan Mick <dan.mick@inktank.com>
Tue, 11 Jun 2013 00:25:55 +0000 (17:25 -0700)
committerDan Mick <dan.mick@inktank.com>
Tue, 11 Jun 2013 01:25:39 +0000 (18:25 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h

index 8d07c5ec795778046c819d98d532156df2b64aa8..f0ae6dd9488fe7cddc032a940f42c35ae7e924df 100644 (file)
@@ -1027,6 +1027,13 @@ void CrushWrapper::dump(Formatter *f) const
   f->open_array_section("rules");
   dump_rules(f);
   f->close_section();
+
+  f->open_object_section("tunables");
+  f->dump_int("choose_local_tries", get_choose_local_tries());
+  f->dump_int("choose_local_fallback_tries", get_choose_local_fallback_tries());
+  f->dump_int("choose_total_tries", get_choose_total_tries());
+  f->dump_int("chooseleaf_descend_once", get_chooseleaf_descend_once());
+  f->close_section();
 }
 
 void CrushWrapper::dump_rules(Formatter *f) const
index ce97b29ad9da975f3c15862cc5d2cb1940199906..c123da3d9d5282d610795198b0671c2b72cf1341 100644 (file)
@@ -140,7 +140,7 @@ public:
     crush->choose_total_tries = n;
   }
 
-  int get_chooseleaf_descend_once() {
+  int get_chooseleaf_descend_once() const {
     return crush->chooseleaf_descend_once;
   }
   void set_chooseleaf_descend_once(int n) {