]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: make get_immediate_parent const
authorSage Weil <sage@redhat.com>
Wed, 15 Mar 2017 16:45:41 +0000 (12:45 -0400)
committerSage Weil <sage@redhat.com>
Sat, 25 Mar 2017 18:53:14 +0000 (14:53 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h

index dba2e31b0eb0b6c436a8d745f55290a6a123c05e..940296a8b6d649ff8fa6227350de07ba115092b9 100644 (file)
@@ -998,7 +998,7 @@ pair<string,string> CrushWrapper::get_immediate_parent(int id, int *_ret)
   return pair<string, string>();
 }
 
-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];
index f81d2b17370082d6c379f13672341abeff5de987..ddebdafc801520ce52934e4b8135ede13f8b63ba 100644 (file)
@@ -554,7 +554,7 @@ public:
    * FIXME: ambiguous for items that occur multiple times in the map
    */
   pair<string,string> 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