Skip to content

Commit

Permalink
Merge pull request ceph#5959 from mslovy/wip-current-dev
Browse files Browse the repository at this point in the history
mon: Fix unnecessary at/near max target warn in ceph -s

Reviewed-by: Sage Weil <[email protected]>
Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Sep 25, 2015
2 parents 1392122 + b41f574 commit fe35ba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mon/PGMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
uint64_t ratio = p->second.cache_target_full_ratio_micro +
((1000000 - p->second.cache_target_full_ratio_micro) *
g_conf->mon_cache_target_full_warn_ratio);
if (p->second.target_max_objects && (uint64_t)st.stats.sum.num_objects >
if (p->second.target_max_objects && (uint64_t)(st.stats.sum.num_objects - st.stats.sum.num_objects_hit_set_archive) >
p->second.target_max_objects * (ratio / 1000000.0)) {
nearfull = true;
if (detail) {
Expand All @@ -2134,7 +2134,7 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
detail->push_back(make_pair(HEALTH_WARN, ss.str()));
}
}
if (p->second.target_max_bytes && (uint64_t)st.stats.sum.num_bytes >
if (p->second.target_max_bytes && (uint64_t)(st.stats.sum.num_bytes - st.stats.sum.num_bytes_hit_set_archive) >
p->second.target_max_bytes * (ratio / 1000000.0)) {
nearfull = true;
if (detail) {
Expand Down

0 comments on commit fe35ba3

Please sign in to comment.