pg_upmap/pg_upmap_items should not bring osds which
no longer belong to a specific crush-tree in.
Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
for (auto p = deviation_osd.rbegin(); p != deviation_osd.rend(); ++p) {
int osd = p->second;
float deviation = p->first;
+ // make sure osd is still there (belongs to this crush-tree)
+ assert(osd_weight.count(osd));
float target = osd_weight[osd] * pgs_per_weight;
assert(target > 0);
if (deviation/target < max_deviation_ratio) {