Skip to content

Commit

Permalink
osd: Round fullness in message to correspond to df -h
Browse files Browse the repository at this point in the history
This really only works after journal drains because
we adjust for the journal.

Signed-off-by: David Zafman <dzafman@redhat.com>
  • Loading branch information
dzafman committed Feb 27, 2017
1 parent 78adb70 commit 26dcb59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 26dcb59

Please sign in to comment.