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/PGMap: Fix %USED calculation bug. #19165

Merged
merged 1 commit into from Nov 29, 2017
Merged

Conversation

xiaoxichen
Copy link
Contributor

Previous code forgot to multiple raw_used_ratio to calculate
used byte.

Fixes: http://tracker.ceph.com/issues/22247
Signed-off-by: Xiaoxi Chen xiaoxchen@ebay.com

@xiaoxichen
Copy link
Contributor Author

@tchaikov mind take a look?

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

aside from the nit, lgtm. thanks for fixing this!

src/mon/PGMap.cc Outdated
@@ -845,8 +845,9 @@ void PGMapDigest::dump_object_stat_sum(
curr_object_copies_rate = (float)(sum.num_object_copies - sum.num_objects_degraded) / sum.num_object_copies;

float used = 0.0;
//note avail passed in is raw_avail, calc raw_used here.
Copy link
Contributor

Choose a reason for hiding this comment

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

might want to add a space before "note"

Previous code forgot to multiple raw_used_ratio to calculate
used byte.

Fixes: http://tracker.ceph.com/issues/22247
Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants