summaryrefslogtreecommitdiff
path: root/fs/ceph/metric.h
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2020-09-03 16:01:40 +0300
committerIlya Dryomov <idryomov@gmail.com>2020-10-12 16:29:26 +0300
commit1dd8d470813699baab9112e95fce00979b21c4f7 (patch)
treefac3dd9bc808ffbe8ddc9636b4486848e794f1ab /fs/ceph/metric.h
parent2678da88f4b449300d56e0e7a9e77d1a79c83463 (diff)
downloadlinux-1dd8d470813699baab9112e95fce00979b21c4f7.tar.xz
ceph: metrics for opened files, pinned caps and opened inodes
In client for each inode, it may have many opened files and may have been pinned in more than one MDS servers. And some inodes are idle, which have no any opened files. This patch will show these metrics in the debugfs, likes: item total ----------------------------------------- opened files / total inodes 14 / 5 pinned i_caps / total inodes 7 / 5 opened inodes / total inodes 3 / 5 Will send these metrics to ceph, which will be used by the `fs top`, later. [ jlayton: drop unrelated hunk, count hashed inodes instead of allocated ones ] URL: https://tracker.ceph.com/issues/47005 Signed-off-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/metric.h')
-rw-r--r--fs/ceph/metric.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ceph/metric.h b/fs/ceph/metric.h
index 1d0959d669d7..710f3f1dceab 100644
--- a/fs/ceph/metric.h
+++ b/fs/ceph/metric.h
@@ -115,6 +115,13 @@ struct ceph_client_metric {
ktime_t metadata_latency_min;
ktime_t metadata_latency_max;
+ /* The total number of directories and files that are opened */
+ atomic64_t opened_files;
+
+ /* The total number of inodes that have opened files or directories */
+ struct percpu_counter opened_inodes;
+ struct percpu_counter total_inodes;
+
struct ceph_mds_session *session;
struct delayed_work delayed_work; /* delayed work */
};