are being balanced
Before this commit, When multiple pools are being balanced,
pgs_per_weight only considers the last pool, which is wrong.
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
}
total_pgs += pdata.get_size() * pdata.get_pg_num();
- osds_weight_total = get_osds_weight(cct, tmp_osd_map, pid, osds_weight);
+ osds_weight_total += get_osds_weight(cct, tmp_osd_map, pid, osds_weight);
}
for (auto& [oid, oweight] : osds_weight) {
int pgs = 0;