From 38b35ab9d17eb84ac178c4cd3ebcf2ec0f66d8b6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 10 Apr 2015 08:43:45 -0700 Subject: [PATCH] crush: fix has_v4_buckets() alg, not type! This bug made us incorrectly think we were using v4 features when user type 5 was being used. That's currently 'rack' with recent crush maps, but was other types for clusters that were created with older versions. This is clearly problematic as it will lock out non-hammer clients incorrectly, breaking deployments on upgrade. Fixes: #11364 Backport: hammer Signed-off-by: Sage Weil --- src/crush/CrushWrapper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index d0c24af12c9c..497c2196958a 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -72,7 +72,7 @@ bool CrushWrapper::has_v4_buckets() const crush_bucket *b = crush->buckets[i]; if (!b) continue; - if (b->type == CRUSH_BUCKET_STRAW2) + if (b->alg == CRUSH_BUCKET_STRAW2) return true; } return false; -- 2.47.3