]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: reset bucket->h.items[i] when removing tree item 10496/head
authorKefu Chai <kchai@redhat.com>
Fri, 1 Jul 2016 12:44:35 +0000 (20:44 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Fri, 29 Jul 2016 10:43:57 +0000 (16:13 +0530)
commit79e2acb9a585ede5b97d804550b5394f277e7cc4
tree7b43ea007d0f162253f0387c15295423ca691dfc
parent894a5f8d878d4b267f80b90a4bffce157f2b4ba7
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)
src/crush/builder.c
src/test/crush/CrushWrapper.cc