]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: rebuild shadow trees on removing crush rule 17058/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 18 Aug 2017 02:25:13 +0000 (10:25 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 18 Aug 2017 02:37:12 +0000 (10:37 +0800)
In case this is the last crush rule which is still referencing
a specific device class. Otherwise the device class might stay
hanging.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/crush/CrushWrapper.cc

index 76c6afe60a5ce32535af0c088f30f4d2a0d86998..26954b8dee6dc4658dc111231434d4276297a51f 100644 (file)
@@ -1667,7 +1667,7 @@ int CrushWrapper::remove_rule(int ruleno)
   crush->rules[ruleno] = NULL;
   rule_name_map.erase(ruleno);
   have_rmaps = false;
-  return 0;
+  return rebuild_roots_with_classes();
 }
 
 int CrushWrapper::bucket_adjust_item_weight(CephContext *cct, crush_bucket *bucket, int item, int weight)