From: kungf Date: Tue, 17 Oct 2017 14:40:43 +0000 (+0800) Subject: osd: add scrub week day constraint X-Git-Tag: v12.2.6~98^2~33 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=90a8c308efd96a8d7af495c8bbfaa16199a2203f;p=ceph.git osd: add scrub week day constraint if add week day constraint, we can set scrub permit time more flexible. eg. we can set scurb in Monday-Wednesday 0-12 o'clock according set this parameter: osd_scrub_begin_week_day = 1 osd_scrub_end_week_day = 3 osd_scrub_begin_hour = 0 osd_scrub_end_hour = 12 Signed-off-by: kungf (cherry picked from commit 87be7c70a17492c9e5f06e01722690acec7a2c51) --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 0651b2070a33..4bb51445ce49 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -769,6 +769,8 @@ OPTION(osd_max_scrubs, OPT_INT) OPTION(osd_scrub_during_recovery, OPT_BOOL) // Allow new scrubs to start while recovery is active on the OSD OPTION(osd_scrub_begin_hour, OPT_INT) OPTION(osd_scrub_end_hour, OPT_INT) +OPTION(osd_scrub_begin_week_day, OPT_INT) +OPTION(osd_scrub_end_week_day, OPT_INT) OPTION(osd_scrub_load_threshold, OPT_FLOAT) OPTION(osd_scrub_min_interval, OPT_FLOAT) // if load is low OPTION(osd_scrub_max_interval, OPT_FLOAT) // regardless of load diff --git a/src/common/options.cc b/src/common/options.cc index 5e0596982e7e..4530e74d6859 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2499,6 +2499,14 @@ std::vector