From e110ffde50e0feefae9bacef4aec289e93f106e8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 15 Mar 2017 12:45:41 -0400 Subject: [PATCH] crush: make get_immediate_parent const Signed-off-by: Sage Weil --- src/crush/CrushWrapper.cc | 2 +- src/crush/CrushWrapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index dba2e31b0eb0..940296a8b6d6 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -998,7 +998,7 @@ pair CrushWrapper::get_immediate_parent(int id, int *_ret) return pair(); } -int CrushWrapper::get_immediate_parent_id(int id, int *parent) +int CrushWrapper::get_immediate_parent_id(int id, int *parent) const { for (int bidx = 0; bidx < crush->max_buckets; bidx++) { crush_bucket *b = crush->buckets[bidx]; diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index f81d2b173700..ddebdafc8015 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -554,7 +554,7 @@ public: * FIXME: ambiguous for items that occur multiple times in the map */ pair get_immediate_parent(int id, int *ret = NULL); - int get_immediate_parent_id(int id, int *parent); + int get_immediate_parent_id(int id, int *parent) const; /** * get the fully qualified location of a device by successively finding -- 2.47.3