From 6344fc83938bd90ac6c680950ddff72ff7542dbc Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 16 May 2015 00:07:27 +0800 Subject: [PATCH] osd: use another name for randomize scrub option s/osd_scrub_interval_limit/osd_scrub_interval_randomize_ratio/ Fixes: #10973 Signed-off-by: Kefu Chai --- src/common/config_opts.h | 2 +- src/osd/OSD.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index a4060fa08c9db..e79eeaab801fb 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 8f5d602e32e8c..294272844c443 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; } -- 2.47.3