From b1e4295570b6af4d844cf3ec55d77f5c287b29e6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 22 May 2017 22:51:18 -0400 Subject: [PATCH] crush/CrushWrapper: fix has_incompat_choose_args 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 --- 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 b2c143c91b16..14707f9a36e2 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -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++) { -- 2.47.3