]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: fix distortion of straw scalers by 0-weight items
authorSage Weil <sage@redhat.com>
Tue, 2 Dec 2014 22:50:21 +0000 (14:50 -0800)
committerSage Weil <sage@redhat.com>
Fri, 13 Feb 2015 16:30:45 +0000 (08:30 -0800)
commitbf677093302f475a23de541471ddde6a7c7153b6
tree5e88507708a76d1ef247abf83e07caf85fd53f68
parente02574ef5d3b66e73424a16460366de2d36eded3
crush: fix distortion of straw scalers by 0-weight items

The presence of a 0-weight item in a straw bucket should have no effect
on the placement of other items.  Add a test validating that and fix
crush_calc_straw() to fix the distortion.

Note that this effects the *precalculation* of the straw bucket inputs and
does not effect the actually mapping process given a compiled or encoded
CRUSH map, and only when straw_calc_version == 1 (i.e., the admin opted in
to the new behavior).

Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 85498bc8f62ca56506b33f3c5ec4fc4b111ed73d)
src/crush/builder.c
src/test/crush/TestCrushWrapper.cc