]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: reset bucket->h.items[i] when removing tree item 10093/head
authorKefu Chai <kchai@redhat.com>
Fri, 1 Jul 2016 12:44:35 +0000 (20:44 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 1 Jul 2016 13:19:45 +0000 (21:19 +0800)
commita7069c7aab6b3f605f3d8f909af96f87977e8698
treeb75d42a1d981e64f8317f8379501f4dfb27d2119
parent85bb43e111692989d2296a389ce45377d2297d6f
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>
src/crush/builder.c
src/test/crush/CrushWrapper.cc