Skip to content

Commit

Permalink
mon/pgmonitor: use appropriate forced conversions in get_rule_avail
Browse files Browse the repository at this point in the history
use appropriate forced conversions in get_rule_avail

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
  • Loading branch information
renhwztetecs committed Feb 19, 2016
1 parent 06cecb4 commit 024caa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mon/PGMonitor.cc
Expand Up @@ -1394,8 +1394,8 @@ int64_t PGMonitor::get_rule_avail(OSDMap& osdmap, int ruleno) const
// calculate proj below.
continue;
}
int64_t proj = (float)((osd_info->second).kb_avail * 1024ull) /
(double)p->second;
int64_t proj = (int64_t)((double)((osd_info->second).kb_avail * 1024ull) /
(double)p->second);
if (min < 0 || proj < min)
min = proj;
} else {
Expand Down

0 comments on commit 024caa7

Please sign in to comment.