]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: note about get_rule_weight_osd_map limitation
authorSage Weil <sage@redhat.com>
Mon, 1 May 2017 22:27:07 +0000 (17:27 -0500)
committerSage Weil <sage@redhat.com>
Mon, 1 May 2017 22:27:07 +0000 (17:27 -0500)
This eventually needs to get fixed.  Opened
http://tracker.ceph.com/issues/19818

Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.cc

index 7974b9a75014e698ec91afe9544f57fc4abab4d4..88471f87458178edb1b94dc697d3abb8c2f4448e 100644 (file)
@@ -1218,6 +1218,11 @@ int CrushWrapper::get_rule_weight_osd_map(unsigned ruleno, map<int,float> *pmap)
   crush_rule *rule = crush->rules[ruleno];
 
   // build a weight map for each TAKE in the rule, and then merge them
+
+  // FIXME: if there are multiple takes that place a different number of
+  // objects we do not take that into account.  (Also, note that doing this
+  // right is also a function of the pool, since the crush rule
+  // might choose 2 + choose 2 but pool size may only be 3.)
   for (unsigned i=0; i<rule->len; ++i) {
     map<int,float> m;
     float sum = 0;