Skip to content

Commit

Permalink
osd: use another name for randomize scrub option
Browse files Browse the repository at this point in the history
s/osd_scrub_interval_limit/osd_scrub_interval_randomize_ratio/

Fixes: #10973
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov authored and liewegas committed Oct 8, 2015
1 parent fad3386 commit 0742177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0742177

Please sign in to comment.