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 <xie.xingguo@zte.com.cn>
list<pair<health_status_t,string> > &summary,
list<pair<health_status_t,string> > *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) {