From 5c945cd1b8a1b1822ab2a2bfb8a1fd34eefdb2af Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Mon, 10 Jun 2013 17:25:55 -0700 Subject: [PATCH] CrushWrapper: dump tunables along with crush map Signed-off-by: Dan Mick Reviewed-by: Sage Weil --- src/crush/CrushWrapper.cc | 7 +++++++ src/crush/CrushWrapper.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 8d07c5ec79577..f0ae6dd9488fe 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -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 diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index ce97b29ad9da9..c123da3d9d528 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -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) { -- 2.39.5