]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: clear bucket class ids when removed
authorLoic Dachary <ldachary@redhat.com>
Mon, 27 Feb 2017 10:54:39 +0000 (11:54 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 1 Mar 2017 16:24:09 +0000 (17:24 +0100)
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/crush/CrushWrapper.cc

index 45c41596016d4dce62533bbd63cfa5f78a8075ba..35c320f2757dd1959da94e4a3c2ecd3aa1be0d53 100644 (file)
@@ -248,6 +248,8 @@ bool CrushWrapper::_maybe_remove_last_instance(CephContext *cct, int item, bool
     crush_bucket *t = get_bucket(item);
     ldout(cct, 5) << "_maybe_remove_last_instance removing bucket " << item << dendl;
     crush_remove_bucket(crush, t);
+    if (class_bucket.count(item) != 0)
+      class_bucket.erase(item);
   }
   if ((item >= 0 || !unlink_only) && name_map.count(item)) {
     ldout(cct, 5) << "_maybe_remove_last_instance removing name for item " << item << dendl;