From 0742177c767613d41bda0d260eebdd0087e3b392 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 cfdd6a8740f..b8ea33281b6 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7a7fe437545..e15b36b59e0 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; } -- 2.47.3