]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: fix has_v4_buckets() 4322/head
authorSage Weil <sage@redhat.com>
Fri, 10 Apr 2015 15:43:45 +0000 (08:43 -0700)
committerSage Weil <sage@redhat.com>
Fri, 10 Apr 2015 15:43:45 +0000 (08:43 -0700)
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 <sage@redhat.com>
src/crush/CrushWrapper.cc

index d0c24af12c9cbdd4e3202795be72f34b65350e01..497c2196958a2f2404b8d9b1c511885da8b177f8 100644 (file)
@@ -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;