]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #2689 from zhurongze/fix-crush
authorSage Weil <sage@redhat.com>
Mon, 10 Nov 2014 17:02:28 +0000 (09:02 -0800)
committerSage Weil <sage@redhat.com>
Mon, 10 Nov 2014 17:02:28 +0000 (09:02 -0800)
crush: fix incorrect use of adjust_item_weight method

Reviewed-by: Sage Weil <sage@redhat.com>
1  2 
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/test/crush/TestCrushWrapper.cc

Simple merge
index 94bb8eef34a44b2bc4802359173886c8cc3fcdce,b864ce34a5a25adefefb72441fc29c76760533a7..af7447a6d3692987700ed10f0a62fb89c2a4672b
@@@ -554,10 -541,14 +554,14 @@@ public
     * @param id item id to check
     * @return weight of item
     */
 -  int get_item_weight(int id);
 -  float get_item_weightf(int id) {
 +  int get_item_weight(int id) const;
 +  float get_item_weightf(int id) const {
      return (float)get_item_weight(id) / (float)0x10000;
    }
+   int get_item_weight_in_loc(int id, const map<string,string> &loc);
+   float get_item_weightf_in_loc(int id, const map<string,string> &loc) {
+     return (float)get_item_weight_in_loc(id, loc) / (float)0x10000;
+   }
  
    int adjust_item_weight(CephContext *cct, int id, int weight);
    int adjust_item_weightf(CephContext *cct, int id, float weight) {
Simple merge