From 93ef911bbfcaf2a61b93380d54578e1d796d04f7 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 11 Nov 2014 13:28:31 -0800 Subject: [PATCH] PG: add config to ignore history les in find_best_info Signed-off-by: Samuel Just --- src/common/config_opts.h | 3 +++ src/osd/PG.cc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index b13eb0982606c..9206555122179 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -468,6 +468,9 @@ OPTION(osd_agent_min_evict_effort, OPT_FLOAT, .1) OPTION(osd_agent_quantize_effort, OPT_FLOAT, .1) OPTION(osd_agent_delay_time, OPT_FLOAT, 5.0) +// osd ignore history.last_epoch_started in find_best_info +OPTION(osd_find_best_info_ignore_history_les, OPT_BOOL, false) + // decay atime and hist histograms after how many objects go by OPTION(osd_agent_hist_halflife, OPT_INT, 1000) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c124f7ff85973..ee3903aafc876 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -893,7 +893,8 @@ map::const_iterator PG::find_best_info( for (map::const_iterator i = infos.begin(); i != infos.end(); ++i) { - if (max_last_epoch_started_found < i->second.history.last_epoch_started) { + if (!cct->_conf->osd_find_best_info_ignore_history_les && + max_last_epoch_started_found < i->second.history.last_epoch_started) { min_last_update_acceptable = eversion_t::max(); max_last_epoch_started_found = i->second.history.last_epoch_started; } -- 2.39.5