Signed-off-by: Sage Weil <sage@redhat.com>
} else {
// by osd utilization
int num_osd = MIN(1, pgm.osd_stat.size());
- if (pgm.osd_sum.kb * 1024 / num_osd
+ if ((uint64_t)pgm.osd_sum.kb * 1024 / num_osd
< g_conf->mon_reweight_min_bytes_per_osd) {
ostringstream oss;
oss << "Refusing to reweight: we only have " << pgm.osd_sum.kb
out_str = oss.str();
return -EDOM;
}
- if (pgm.osd_sum.kb_used * 1024 / num_osd
+ if ((uint64_t)pgm.osd_sum.kb_used * 1024 / num_osd
< g_conf->mon_reweight_min_bytes_per_osd) {
ostringstream oss;
oss << "Refusing to reweight: we only have " << pgm.osd_sum.kb_used