From f180b64c595e20f759acad3a2fe67b56514d1298 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 20 Jan 2015 11:12:45 +0000 Subject: [PATCH] osdc: make op count in Filer::purge configurable Previously this was simply hardcoded to do up to 10 RADOS delete ops at a time. Make this a config option so that Filer consumers (like the MDS) can know how many concurrent operations will be done on their behalf. Signed-off-by: John Spray --- src/common/config_opts.h | 3 +++ src/osdc/Filer.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 40a5808fd2c..a40e1c4841d 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -340,6 +340,9 @@ OPTION(objecter_inflight_ops, OPT_U64, 1024) // max in-flight ios OPTION(objecter_completion_locks_per_session, OPT_U64, 32) // num of completion locks per each session, for serializing same object responses OPTION(objecter_inject_no_watch_ping, OPT_BOOL, false) // suppress watch pings +// Max number of deletes at once in a single Filer::purge call +OPTION(filer_max_purge_ops, OPT_U32, 10) + OPTION(journaler_allow_split_entries, OPT_BOOL, true) OPTION(journaler_write_head_interval, OPT_INT, 15) OPTION(journaler_prefetch_periods, OPT_INT, 10) // * journal object size diff --git a/src/osdc/Filer.cc b/src/osdc/Filer.cc index d89c8781ea0..5c8a13d8697 100644 --- a/src/osdc/Filer.cc +++ b/src/osdc/Filer.cc @@ -324,7 +324,7 @@ void Filer::_do_purge_range(PurgeRange *pr, int fin) std::vector remove_oids; - int max = 10 - pr->uncommitted; + int max = cct->_conf->filer_max_purge_ops - pr->uncommitted; while (pr->num > 0 && max > 0) { remove_oids.push_back(file_object_t(pr->ino, pr->first)); pr->uncommitted++;