From: xie xingguo Date: Thu, 28 Apr 2016 06:20:12 +0000 (+0800) Subject: mon/PGMonitor: fix inaccurate warn of unscrubbed pgs X-Git-Tag: v11.0.0~136^2~9^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=869800f31ad976679e556cee243b28bf4eb72167;p=ceph.git mon/PGMonitor: fix inaccurate warn of unscrubbed pgs 1. we automatically perform deep-scrub at osd_deep_scrub_interval, not mon_scrub_interval(1week vs. 1day). 2. theoretically a pg can be in a combination state of both unscrubbed and un-deep-scrubbed. Signed-off-by: xie xingguo --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 8b4c44bedc02..ab50baf9d065 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -2124,7 +2124,7 @@ namespace { cct->_conf->mon_warn_not_scrubbed + cct->_conf->mon_scrub_interval; const int mon_warn_not_deep_scrubbed = - cct->_conf->mon_warn_not_deep_scrubbed + cct->_conf->mon_scrub_interval; + cct->_conf->mon_warn_not_deep_scrubbed + cct->_conf->osd_deep_scrub_interval; bool not_scrubbed = (time_since_ls >= mon_warn_not_scrubbed && cct->_conf->mon_warn_not_scrubbed != 0); @@ -2137,7 +2137,8 @@ namespace { print_unscrubbed_detailed(pg_entry, detail, scrubbed_or_deepscrubbed_t::SCRUBBED); - } else if (not_deep_scrubbed) { + } + if (not_deep_scrubbed) { print_unscrubbed_detailed(pg_entry, detail, scrubbed_or_deepscrubbed_t::DEEPSCRUBBED);