From bf16f59887d6b7624112212cecead3ebec48b6f9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 28 Dec 2017 13:15:17 -0600 Subject: [PATCH] osd: piecewise scrub Perform scrub in stages, with each unit of work requeuing an item in the work queue. Signed-off-by: Sage Weil --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 4 + src/osd/ECBackend.cc | 97 +++++++-------- src/osd/ECBackend.h | 11 +- src/osd/OSD.cc | 6 +- src/osd/PG.cc | 176 ++++++++++++++++++--------- src/osd/PG.h | 13 ++ src/osd/PGBackend.cc | 83 ++++++------- src/osd/PGBackend.h | 18 +-- src/osd/ReplicatedBackend.cc | 206 +++++++++++++++++--------------- src/osd/ReplicatedBackend.h | 11 +- src/osd/osd_types.h | 55 +++++++++ 12 files changed, 411 insertions(+), 270 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index c859ffe5221..6fede5da274 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -743,6 +743,7 @@ OPTION(osd_scrub_auto_repair_num_errors, OPT_U32) // only auto-repair when num OPTION(osd_deep_scrub_interval, OPT_FLOAT) // once a week OPTION(osd_deep_scrub_randomize_ratio, OPT_FLOAT) // scrubs will randomly become deep scrubs at this rate (0.15 -> 15% of scrubs are deep) OPTION(osd_deep_scrub_stride, OPT_INT) +OPTION(osd_deep_scrub_keys, OPT_INT) OPTION(osd_deep_scrub_update_digest_min_age, OPT_INT) // objects must be this old (seconds) before we update the whole-object digest on scrub OPTION(osd_skip_data_digest, OPT_BOOL) OPTION(osd_class_dir, OPT_STR) // where rados plugins are stored diff --git a/src/common/options.cc b/src/common/options.cc index c700871fd77..7f9222d35e7 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2693,6 +2693,10 @@ std::vector