From 9ce8ce689009cf8ef749edd320d1c2a73ecc2f90 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 6 May 2015 10:54:31 -0700 Subject: [PATCH] OSD: add remove_wq suicide timeout Signed-off-by: Samuel Just (cherry picked from commit f2fbfa32a16666be46359f0eab7b04ca80a753f5) Conflicts: src/osd/OSD.cc No next_removal_seq(0) in master --- src/common/config_opts.h | 1 + src/osd/OSD.cc | 6 +++++- src/osd/OSD.h | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index ca849991f2bdd..77fdc22a82666 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -485,6 +485,7 @@ OPTION(osd_scrub_thread_timeout, OPT_INT, 60) OPTION(osd_scrub_finalize_thread_timeout, OPT_INT, 60*10) OPTION(osd_scrub_invalid_stats, OPT_BOOL, true) OPTION(osd_remove_thread_timeout, OPT_INT, 60*60) +OPTION(osd_remove_thread_suicide_timeout, OPT_INT, 10*60*60) OPTION(osd_command_thread_timeout, OPT_INT, 10*60) OPTION(osd_command_thread_suicide_timeout, OPT_INT, 15*60) OPTION(osd_age, OPT_FLOAT, .8) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 97ed2911a819e..74d90d8829fc1 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -973,7 +973,11 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_, scrub_wq(this, cct->_conf->osd_scrub_thread_timeout, &disk_tp), scrub_finalize_wq(cct->_conf->osd_scrub_finalize_thread_timeout, &op_tp), rep_scrub_wq(this, cct->_conf->osd_scrub_thread_timeout, &disk_tp), - remove_wq(store, cct->_conf->osd_remove_thread_timeout, &disk_tp), + remove_wq( + store, + cct->_conf->osd_remove_thread_timeout, + cct->_conf->osd_remove_thread_suicide_timeout, + &disk_tp), next_removal_seq(0), service(this) { diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 3ebf654902303..10828f26aeee1 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1901,9 +1901,9 @@ protected: public ThreadPool::WorkQueueVal > { ObjectStore *&store; list > remove_queue; - RemoveWQ(ObjectStore *&o, time_t ti, ThreadPool *tp) + RemoveWQ(ObjectStore *&o, time_t ti, time_t si, ThreadPool *tp) : ThreadPool::WorkQueueVal >( - "OSD::RemoveWQ", ti, 0, tp), + "OSD::RemoveWQ", ti, si, tp), store(o) {} bool _empty() { -- 2.39.5