From: Sage Weil Date: Mon, 1 May 2017 22:27:07 +0000 (-0500) Subject: crush/CrushWrapper: note about get_rule_weight_osd_map limitation X-Git-Tag: v12.1.0~10^2~91^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=56169420247854c3e61ae0fa18e3cd9f966cfd96;p=ceph.git crush/CrushWrapper: note about get_rule_weight_osd_map limitation This eventually needs to get fixed. Opened http://tracker.ceph.com/issues/19818 Signed-off-by: Sage Weil --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 7974b9a75014..88471f874581 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1218,6 +1218,11 @@ int CrushWrapper::get_rule_weight_osd_map(unsigned ruleno, map *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; ilen; ++i) { map m; float sum = 0;