From: Igor Fedotov Date: Tue, 27 Apr 2021 10:38:31 +0000 (+0300) Subject: osd: compute OSD's space usage ratio via raw space utilization X-Git-Tag: v16.2.5~98^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e1ea499507ca0bc22ba04e17ad2950738bcc2dab;p=ceph.git osd: compute OSD's space usage ratio via raw space utilization Fixes: https://tracker.ceph.com/issues/50533 Signed-off-by: Igor Fedotov (cherry picked from commit 81c4d82be02ee14aff2849b3025a5dea6cb0327e) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 121190f4095..c2be257bd0b 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1026,7 +1026,7 @@ float OSDService::compute_adjusted_ratio(osd_stat_t new_stat, float *pratio, uint64_t adjust_used) { *pratio = - ((float)new_stat.statfs.get_used()) / ((float)new_stat.statfs.total); + ((float)new_stat.statfs.get_used_raw()) / ((float)new_stat.statfs.total); if (adjust_used) { dout(20) << __func__ << " Before kb_used() " << new_stat.statfs.kb_used() << dendl; @@ -1047,7 +1047,7 @@ float OSDService::compute_adjusted_ratio(osd_stat_t new_stat, float *pratio, if (backfill_adjusted) { dout(20) << __func__ << " backfill adjusted " << new_stat << dendl; } - return ((float)new_stat.statfs.get_used()) / ((float)new_stat.statfs.total); + return ((float)new_stat.statfs.get_used_raw()) / ((float)new_stat.statfs.total); } void OSDService::send_message_osd_cluster(int peer, Message *m, epoch_t from_epoch)