aboutsummaryrefslogtreecommitdiff
path: root/fs/ceph/metric.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/metric.h')
-rw-r--r--fs/ceph/metric.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ceph/metric.h b/fs/ceph/metric.h
index da725dacabfe..098ee8a9adaf 100644
--- a/fs/ceph/metric.h
+++ b/fs/ceph/metric.h
@@ -10,8 +10,21 @@ struct ceph_client_metric {
atomic64_t total_dentries;
struct percpu_counter d_lease_hit;
struct percpu_counter d_lease_mis;
+
+ struct percpu_counter i_caps_hit;
+ struct percpu_counter i_caps_mis;
};
extern int ceph_metric_init(struct ceph_client_metric *m);
extern void ceph_metric_destroy(struct ceph_client_metric *m);
+
+static inline void ceph_update_cap_hit(struct ceph_client_metric *m)
+{
+ percpu_counter_inc(&m->i_caps_hit);
+}
+
+static inline void ceph_update_cap_mis(struct ceph_client_metric *m)
+{
+ percpu_counter_inc(&m->i_caps_mis);
+}
#endif /* _FS_CEPH_MDS_METRIC_H */