]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: fix has_incompat_choose_args 15218/head
authorSage Weil <sage@redhat.com>
Tue, 23 May 2017 02:51:18 +0000 (22:51 -0400)
committerSage Weil <sage@redhat.com>
Tue, 23 May 2017 02:51:18 +0000 (22:51 -0400)
If the map has *no* choose_args it does not have incompat choose args.
This makes the OSDMap::get_features() check

  if (crush->has_incompat_choose_args())
    features |= CEPH_FEATURE_CRUSH_CHOOSE_ARGS;

happier.

Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.cc

index b2c143c91b16026725f483b7c785167de4ede7d0..14707f9a36e2ddf2862669657561c26212aeba09 100644 (file)
@@ -112,7 +112,7 @@ bool CrushWrapper::has_choose_args() const
 
 bool CrushWrapper::has_incompat_choose_args() const
 {
-  if (choose_args.size() != 1)
+  if (choose_args.size() > 1)
     return true;
   crush_choose_arg_map arg_map = choose_args.begin()->second;
   for (__u32 i = 0; i < arg_map.size; i++) {