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>
(cherry picked from commit
968b72d8595996ee4d2e1364264c4c8203532045)
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)