From: Sage Weil Date: Wed, 15 Mar 2017 16:45:41 +0000 (-0400) Subject: crush: make get_immediate_parent const X-Git-Tag: v12.0.2~280^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e110ffde50e0feefae9bacef4aec289e93f106e8;p=ceph.git crush: make get_immediate_parent const Signed-off-by: Sage Weil --- 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