Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/pgmonitor: use appropriate forced conversions in get_rule_avail #7705

Merged
merged 1 commit into from Mar 7, 2016
Merged

mon/pgmonitor: use appropriate forced conversions in get_rule_avail #7705

merged 1 commit into from Mar 7, 2016

Conversation

renhwztetecs
Copy link
Contributor

use appropriate forced conversions in get_rule_avail

Signed-off-by: huanwen ren ren.huanwen@zte.com.cn

use appropriate forced conversions in get_rule_avail

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
@ghost ghost added the core label Feb 19, 2016
@liewegas liewegas added this to the jewel milestone Feb 22, 2016
@@ -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) /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why shall we add "double" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov
Not necessary, just in order to better identify

liewegas added a commit that referenced this pull request Mar 7, 2016
…vail

mon/pgmonitor: use appropriate forced conversions in get_rule_avail
@liewegas liewegas merged commit f78d7e8 into ceph:master Mar 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants