]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: reset bucket->h.items[i] when removing tree item 10724/head
authorKefu Chai <kchai@redhat.com>
Fri, 1 Jul 2016 12:44:35 +0000 (20:44 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Wed, 16 Nov 2016 02:46:18 +0000 (10:46 +0800)
commit2b87a551c603291d6c018ed72b0c58e8e45bc334
tree933a9876cae8438a8270703c2f5c5335abed711f
parentf776699fd00ff5f0deea15ec4f2efb991831b055
crush: reset bucket->h.items[i] when removing tree item

* crush: so we don't see the reference after the removing, this keeps
  check_item_loc() happy, and move_bucket() use check_item_loc() to see if
  the removed bucket disappears after the removal.
* test: also add unittest_crush_wrapper::CrushWrapper.insert_item

Fixes: http://tracker.ceph.com/issues/16525
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a7069c7aab6b3f605f3d8f909af96f87977e8698)

Backport change: modify some codes that only works on c++ 11
src/crush/builder.c
src/test/crush/CrushWrapper.cc