From fc41273495bf2c0290d5ec0e9032e3ef39f26e77 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 19 Aug 2014 14:33:54 -0700 Subject: [PATCH] mon: fix signed/unsigned warnings Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 36502c833a057..a8589514a5c28 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 -- 2.39.5