crush: rebuild shadow trees on removing crush rule

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>
This commit is contained in:
xie xingguo 2017-08-18 10:25:13 +08:00
parent 3e4fe5bc74
commit 968b72d859

View 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)