From 0b50d073fab11f64682e20fec7bb71d4e931bd3c Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 23 May 2013 17:40:44 -0700 Subject: [PATCH] PG: ping tphandle during omap loop as well Signed-off-by: Samuel Just --- src/common/config_opts.h | 1 + src/osd/PG.cc | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 34e2cabd8d00d..d2a9c49d5ac2a 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -354,6 +354,7 @@ OPTION(osd_scrub_min_interval, OPT_FLOAT, 60*60*24) // if load is low OPTION(osd_scrub_max_interval, OPT_FLOAT, 7*60*60*24) // regardless of load OPTION(osd_deep_scrub_interval, OPT_FLOAT, 60*60*24*7) // once a week OPTION(osd_deep_scrub_stride, OPT_INT, 524288) +OPTION(osd_scan_list_ping_tp_interval, OPT_U64, 100) OPTION(osd_auto_weight, OPT_BOOL, false) OPTION(osd_class_dir, OPT_STR, CEPH_LIBDIR "/rados-classes") // where rados plugins are stored OPTION(osd_check_for_log_corruption, OPT_BOOL, false) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c8a9a17e6db88..e4297e20e3d49 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3200,7 +3200,14 @@ void PG::_scan_list( ObjectMap::ObjectMapIterator iter = osd->store->get_omap_iterator( coll, poid); assert(iter); + uint64_t keys_scanned = 0; for (iter->seek_to_first(); iter->valid() ; iter->next()) { + if (g_conf->osd_scan_list_ping_tp_interval && + (keys_scanned % g_conf->osd_scan_list_ping_tp_interval == 0)) { + handle.reset_tp_timeout(); + } + ++keys_scanned; + dout(25) << "CRC key " << iter->key() << " value " << string(iter->value().c_str(), iter->value().length()) << dendl; -- 2.39.5