]> 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)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Mon, 19 Jun 2017 05:46:42 +0000 (09:46 +0400)
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 c1794ea581dd69a50626e2745ed310c4f82e0deb..b1983705dbdbc28d327e2a699e0c171b403df3ed 100644 (file)
@@ -734,9 +734,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()