]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Round fullness in message to correspond to df -h
authorDavid Zafman <dzafman@redhat.com>
Fri, 17 Feb 2017 06:23:06 +0000 (22:23 -0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 18 Jul 2017 20:12:57 +0000 (22:12 +0200)
This really only works after journal drains because
we adjust for the journal.

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 26dcb591f9af01ed444aa758c3d601e7f67261b2)

src/osd/OSD.cc

index f30cdb459d0fe42deaf42d7540d9bf1262b305dc..9752ad1d58e41faf400c8528c7a829bbb0055992 100644 (file)
@@ -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()