]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: ping tphandle during omap loop as well
authorSamuel Just <sam.just@inktank.com>
Fri, 24 May 2013 00:40:44 +0000 (17:40 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 24 May 2013 02:42:32 +0000 (19:42 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/common/config_opts.h
src/osd/PG.cc

index 02ceda5703ef48f1b578022329d569e316748f3a..6fc6c0159710e9a7b3fcff72383b28e3d2627a30 100644 (file)
@@ -416,6 +416,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)
index 6e8079dae5a022db89ed8a663211ab4d687e187b..3575cece695cafb0ac72f4e410948807ee0f67b5 100644 (file)
@@ -3308,7 +3308,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;