]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: use another name for randomize scrub option 3946/head
authorKefu Chai <kchai@redhat.com>
Fri, 15 May 2015 16:07:27 +0000 (00:07 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 20 May 2015 10:23:21 +0000 (18:23 +0800)
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 a4060fa08c9db85b82c8a8231e14fb6a4621be28..e79eeaab801fb5496c1ee8287b3332c3c70c3ed5 100644 (file)
@@ -634,7 +634,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 8f5d602e32e8ccf32e372fbed390f3d69251c01a..294272844c4439aecbd46884aefe25c6c09e2399 100644 (file)
@@ -5857,9 +5857,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;
   }