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: v11.2.1~18^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d69e4e5e6ad633e38fc62ca0859cea1f146744b1;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 (cherry picked from commit 26dcb591f9af01ed444aa758c3d601e7f67261b2) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f30cdb459d0..9752ad1d58e 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -730,9 +730,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()