mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
f9009efac4
For dentry leases, only count the hit/miss info triggered from the vfs calls. For the cases like request reply handling and ceph_trim_dentries, ignore them. For now, these are only viewable using debugfs. Future patches will allow the client to send the stats to the MDS. The output looks like: item total miss hit ------------------------------------------------- d_lease 11 7 141 URL: https://tracker.ceph.com/issues/43215 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
18 lines
493 B
C
18 lines
493 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _FS_CEPH_MDS_METRIC_H
|
|
#define _FS_CEPH_MDS_METRIC_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/percpu_counter.h>
|
|
|
|
/* This is the global metrics */
|
|
struct ceph_client_metric {
|
|
atomic64_t total_dentries;
|
|
struct percpu_counter d_lease_hit;
|
|
struct percpu_counter d_lease_mis;
|
|
};
|
|
|
|
extern int ceph_metric_init(struct ceph_client_metric *m);
|
|
extern void ceph_metric_destroy(struct ceph_client_metric *m);
|
|
#endif /* _FS_CEPH_MDS_METRIC_H */
|