From: David Zafman Date: Fri, 17 Feb 2017 06:23:06 +0000 (-0800) Subject: osd: Round fullness in message to correspond to df -h X-Git-Tag: v12.0.1~168^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26dcb591f9af01ed444aa758c3d601e7f67261b2;p=ceph.git osd: Round fullness in message to correspond to df -h This really only works after journal drains because we adjust for the journal. Signed-off-by: David Zafman --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e8ca67ead2d0..fba5e40cb4c2 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -735,9 +735,9 @@ void OSDService::check_nearfull_warning(const osd_stat_t &osd_stat) } last_msg = now; if (cur_state == FULL) - clog->error() << "OSD full dropping all updates " << (int)(ratio * 100) << "% full"; + clog->error() << "OSD full dropping all updates " << (int)roundf(ratio * 100) << "% full"; else - clog->warn() << "OSD near full (" << (int)(ratio * 100) << "%)"; + clog->warn() << "OSD near full (" << (int)roundf(ratio * 100) << "%)"; } bool OSDService::check_failsafe_full()