summaryrefslogtreecommitdiffstats
path: root/src/mds/SessionMap.h
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2020-08-06 18:04:23 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2020-08-07 04:17:03 +0200
commit63392e1b65fbead6ef8c7acd6a70e6ef5b322390 (patch)
tree7db37d785e88b21d247facbe09d8796f66665986 /src/mds/SessionMap.h
parentqa: use config_set/config_get (diff)
downloadceph-63392e1b65fbead6ef8c7acd6a70e6ef5b322390.tar.xz
ceph-63392e1b65fbead6ef8c7acd6a70e6ef5b322390.zip
mds: add working set minimum for caps
A client may hold many inodes pinned in its cache for open files. That client may be unable to release those caps to respond to cache pressure from the MDS (or quiescent client cap recall). We should not complain if that number of capabilities is reasonable (< 10k by default). Fixes: https://tracker.ceph.com/issues/46830 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/mds/SessionMap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h
index c57453fb70c..4f190da4b5c 100644
--- a/src/mds/SessionMap.h
+++ b/src/mds/SessionMap.h
@@ -354,6 +354,10 @@ public:
return info.completed_flushes.count(tid);
}
+ uint64_t get_num_caps() const {
+ return caps.size();
+ }
+
unsigned get_num_completed_flushes() const { return info.completed_flushes.size(); }
unsigned get_num_trim_flushes_warnings() const {
return num_trim_flushes_warnings;