ceph: metrics for opened files, pinned caps and opened inodes
authorXiubo Li <xiubli@redhat.com>
Thu, 3 Sep 2020 13:01:40 +0000 (09:01 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 12 Oct 2020 13:29:26 +0000 (15:29 +0200)
commit1dd8d470813699baab9112e95fce00979b21c4f7
treefac3dd9bc808ffbe8ddc9636b4486848e794f1ab
parent2678da88f4b449300d56e0e7a9e77d1a79c83463
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>
fs/ceph/caps.c
fs/ceph/debugfs.c
fs/ceph/inode.c
fs/ceph/metric.c
fs/ceph/metric.h