From: xie xingguo Date: Wed, 17 Aug 2016 03:22:38 +0000 (+0800) Subject: mon/PGMonitor: skip scrub checking if we can X-Git-Tag: v11.0.1~422^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f3cf0d68ad7129e4a50d418f04a024195aee6b6;p=ceph.git mon/PGMonitor: skip scrub checking if we can The PG-scrub checking may become expensive once the cluster is big. Since the scrub-warn related options are defaulted to be off, we should skip this checking when it is possible, which is good for performance. Signed-off-by: xie xingguo --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index a9e1f16627dc..04c75e59d582 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -2127,6 +2127,10 @@ namespace { list > &summary, list > *detail, const CephContext* cct) { + if (cct->_conf->mon_warn_not_scrubbed == 0 && + cct->_conf->mon_warn_not_deep_scrubbed == 0) + return; + int pgs_count = 0; const utime_t now = ceph_clock_now(nullptr); for (const auto& pg_entry : pg_stats) {