]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix signed/unsigned warnings
authorSage Weil <sage@redhat.com>
Tue, 19 Aug 2014 21:33:54 +0000 (14:33 -0700)
committerSage Weil <sage@redhat.com>
Tue, 19 Aug 2014 21:33:54 +0000 (14:33 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 36502c833a0575e5c43381f9f4dadf54b73666d1..a8589514a5c28d88bf84a1cf8142846544d48527 100644 (file)
@@ -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