]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: use another name for randomize scrub option 6199/head
authorKefu Chai <kchai@redhat.com>
Fri, 15 May 2015 16:07:27 +0000 (00:07 +0800)
committerSage Weil <sage@redhat.com>
Thu, 8 Oct 2015 03:09:49 +0000 (23:09 -0400)
s/osd_scrub_interval_limit/osd_scrub_interval_randomize_ratio/

Fixes: #10973
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/config_opts.h
src/osd/OSD.cc

index cfdd6a8740f43222ded89a787359986af0d82845..b8ea33281b6747266b7e022bcaf92aad4040780c 100644 (file)
@@ -620,7 +620,7 @@ OPTION(osd_scrub_end_hour, OPT_INT, 24)
 OPTION(osd_scrub_load_threshold, OPT_FLOAT, 0.5)
 OPTION(osd_scrub_min_interval, OPT_FLOAT, 60*60*24)    // if load is low
 OPTION(osd_scrub_max_interval, OPT_FLOAT, 7*60*60*24)  // regardless of load
-OPTION(osd_scrub_interval_limit, OPT_FLOAT, 0.5) // randomize the scheduled scrub in the span of [min,min*(1+interval_limit))
+OPTION(osd_scrub_interval_randomize_ratio, OPT_FLOAT, 0.5) // randomize the scheduled scrub in the span of [min,min*(1+randomize_radio))
 OPTION(osd_scrub_chunk_min, OPT_INT, 5)
 OPTION(osd_scrub_chunk_max, OPT_INT, 25)
 OPTION(osd_scrub_sleep, OPT_FLOAT, 0)   // sleep between [deep]scrub ops
index 7a7fe43754523903eebbb94ef2f12c9ca651a083..e15b36b59e01c99727a87d432a8b5889017d225b 100644 (file)
@@ -5918,9 +5918,9 @@ OSDService::ScrubJob::ScrubJob(const spg_t& pg, const utime_t& timestamp, bool m
   // if not explicitly requested, postpone the scrub with a random delay
   if (!must) {
     sched_time += g_conf->osd_scrub_min_interval;
-    if (g_conf->osd_scrub_interval_limit > 0) {
+    if (g_conf->osd_scrub_interval_randomize_ratio > 0) {
       sched_time += rand() % (int)(g_conf->osd_scrub_min_interval *
-                                  g_conf->osd_scrub_interval_limit);
+                                  g_conf->osd_scrub_interval_randomize_ratio);
     }
     deadline += g_conf->osd_scrub_max_interval;
   }