]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: make op count in Filer::purge configurable
authorJohn Spray <john.spray@redhat.com>
Tue, 20 Jan 2015 11:12:45 +0000 (11:12 +0000)
committerJohn Spray <john.spray@redhat.com>
Fri, 20 Mar 2015 12:32:47 +0000 (12:32 +0000)
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 <john.spray@redhat.com>
src/common/config_opts.h
src/osdc/Filer.cc

index 40a5808fd2cbbea3c0cdf80454c3a4ec7d463876..a40e1c4841d0d0ae320b8e5698f08d7af2b3bf0d 100644 (file)
@@ -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
index d89c8781ea0f0f614fbcca79dc2d2dd5ea013db6..5c8a13d869722fdbf27b0db8a60990d4057cfa0e 100644 (file)
@@ -324,7 +324,7 @@ void Filer::_do_purge_range(PurgeRange *pr, int fin)
 
   std::vector<object_t> 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++;