]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush/builder: prevent bucket weight underflow on item removal
authorSage Weil <sage@redhat.com>
Sat, 22 Nov 2014 01:47:56 +0000 (17:47 -0800)
committerSage Weil <sage@redhat.com>
Tue, 9 Dec 2014 00:21:24 +0000 (16:21 -0800)
commit8c87e9502142d5b4a282b94f929ae776a49be1dc
tree8f1883ff465a8ca5d8c340587b2ef04ff1308f4c
parenteeadd60714d908a3a033aeb7fd542c511e63122b
crush/builder: prevent bucket weight underflow on item removal

It is possible to set a bucket weight that is not the sum of the item
weights if you manually modify/build the CRUSH map.  Protect against any
underflow on the bucket weight when removing items.

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