From: Sage Weil Date: Tue, 8 Mar 2016 01:37:04 +0000 (-0500) Subject: crush: remove straw_calc_version check from has_*_tunables() X-Git-Tag: v10.1.0~112^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cdb3af1b9d75a75f872c7eb72ce25d06cc8e046;p=ceph.git crush: remove straw_calc_version check from has_*_tunables() Since we do not set this when we set tunables, we should not check it when we report which tunables they have set. For example, a savvy operator on firefly tunables should set straw_calc_version to 1 but we still want the cluster to report that they are on firefly tunables. Signed-off-by: Sage Weil --- diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index d5bcddda382a..0c25bb9d3815 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -232,7 +232,6 @@ public: crush->chooseleaf_descend_once == 0 && crush->chooseleaf_vary_r == 0 && crush->chooseleaf_stable == 0 && - crush->straw_calc_version == 0 && crush->allowed_bucket_algs == CRUSH_LEGACY_ALLOWED_BUCKET_ALGS; } bool has_bobtail_tunables() const { @@ -243,7 +242,6 @@ public: crush->chooseleaf_descend_once == 1 && crush->chooseleaf_vary_r == 0 && crush->chooseleaf_stable == 0 && - crush->straw_calc_version == 0 && crush->allowed_bucket_algs == CRUSH_LEGACY_ALLOWED_BUCKET_ALGS; } bool has_firefly_tunables() const { @@ -254,7 +252,6 @@ public: crush->chooseleaf_descend_once == 1 && crush->chooseleaf_vary_r == 1 && crush->chooseleaf_stable == 0 && - crush->straw_calc_version == 0 && crush->allowed_bucket_algs == CRUSH_LEGACY_ALLOWED_BUCKET_ALGS; } bool has_hammer_tunables() const { @@ -265,7 +262,6 @@ public: crush->chooseleaf_descend_once == 1 && crush->chooseleaf_vary_r == 1 && crush->chooseleaf_stable == 0 && - crush->straw_calc_version == 1 && crush->allowed_bucket_algs == ((1 << CRUSH_BUCKET_UNIFORM) | (1 << CRUSH_BUCKET_LIST) | (1 << CRUSH_BUCKET_STRAW) | @@ -279,7 +275,6 @@ public: crush->chooseleaf_descend_once == 1 && crush->chooseleaf_vary_r == 1 && crush->chooseleaf_stable == 1 && - crush->straw_calc_version == 1 && crush->allowed_bucket_algs == ((1 << CRUSH_BUCKET_UNIFORM) | (1 << CRUSH_BUCKET_LIST) | (1 << CRUSH_BUCKET_STRAW) |