From: Sage Weil Date: Tue, 19 Aug 2014 21:33:54 +0000 (-0700) Subject: mon: fix signed/unsigned warnings X-Git-Tag: v0.86~241 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc41273495bf2c0290d5ec0e9032e3ef39f26e77;p=ceph.git mon: fix signed/unsigned warnings Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 36502c833a05..a8589514a5c2 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -499,7 +499,7 @@ int OSDMonitor::reweight_by_utilization(int oload, std::string& out_str, } 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 @@ -507,7 +507,7 @@ int OSDMonitor::reweight_by_utilization(int oload, std::string& out_str, 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