]> git-server-git.apps.pok.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)
committerDavid Zafman <dzafman@redhat.com>
Mon, 27 Feb 2017 15:53:56 +0000 (07:53 -0800)
This really only works after journal drains because
we adjust for the journal.

Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/OSD.cc

index e8ca67ead2d0d8f640e07478d79ec405411c8428..fba5e40cb4c2c55fc71b5879c62b5479ceed68f8 100644 (file)
@@ -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()