From b8476ebc5b3c5b5d801bf875bbd6dce5b113325c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 14 Jul 2018 08:59:15 -0500 Subject: [PATCH] common: add osd_distrust_data_digest option If we have reason to distrust the stored full-object oi data digests, this option will ignore them (and opportunistically clear them). It basically affects the same behaviors that osd_skip_data_digest except the previous option only takes effect if bluestore is in use, while this option is unconditional. This serves a workaround for clusters that suffered the 12.2.6 bug that produced bad full-object digests and *also* had PGs' primaries move from bluestore to filestore nodes. In those situations, this option can be set to true. After all OSDs are upgrade and all PGs come back with a clean deep scrub this option can be disabled again. Signed-off-by: Sage Weil --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 4 ++++ src/osd/PrimaryLogPG.cc | 30 ++++++++++++++++++------------ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index e6e609f8aad46..e2ac86444322c 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -790,6 +790,7 @@ 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_distrust_data_digest, OPT_BOOL) OPTION(osd_deep_scrub_large_omap_object_key_threshold, OPT_U64) OPTION(osd_deep_scrub_large_omap_object_value_sum_threshold, OPT_U64) OPTION(osd_class_dir, OPT_STR) // where rados plugins are stored diff --git a/src/common/options.cc b/src/common/options.cc index 7100457059053..7e426c29c3fb3 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1989,6 +1989,10 @@ std::vector