]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: add config to ignore history les in find_best_info
authorSamuel Just <sjust@redhat.com>
Tue, 11 Nov 2014 21:28:31 +0000 (13:28 -0800)
committerSamuel Just <sjust@redhat.com>
Mon, 16 Mar 2015 14:44:43 +0000 (07:44 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/common/config_opts.h
src/osd/PG.cc

index b13eb0982606c9b537ace1fd64a2be1338fa3fcd..9206555122179e0a29fa9aba941116afe265ff4f 100644 (file)
@@ -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)
 
index c124f7ff85973f962a3fde4860e8a2df1aecea1d..ee3903aafc87696c6dbb9b234fef9ff9509fede6 100644 (file)
@@ -893,7 +893,8 @@ map<pg_shard_t, pg_info_t>::const_iterator PG::find_best_info(
   for (map<pg_shard_t, pg_info_t>::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;
     }