]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: fix inaccurate warn of unscrubbed pgs
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 28 Apr 2016 06:20:12 +0000 (14:20 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 28 Apr 2016 06:20:12 +0000 (14:20 +0800)
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 <xie.xingguo@zte.com.cn>
src/mon/PGMonitor.cc

index 8b4c44bedc02b1de80ba03b22a14f7f473996ea5..ab50baf9d065405c9fc207d3b2ee177c8ae31156 100644 (file)
@@ -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);