#ifndef _FS_CEPH_MDS_METRIC_H
#define _FS_CEPH_MDS_METRIC_H
#include <linux/ceph/types.h>
#include <linux/percpu_counter.h>
#include <linux/ktime.h>
extern bool disable_send_metrics;
enum ceph_metric_type { … };
#define CEPHFS_METRIC_SPEC_CLIENT_SUPPORTED …
struct ceph_metric_header { … } __packed;
struct ceph_metric_cap { … } __packed;
struct ceph_metric_read_latency { … } __packed;
struct ceph_metric_write_latency { … } __packed;
struct ceph_metric_metadata_latency { … } __packed;
struct ceph_metric_dlease { … } __packed;
struct ceph_opened_files { … } __packed;
struct ceph_pinned_icaps { … } __packed;
struct ceph_opened_inodes { … } __packed;
struct ceph_read_io_size { … } __packed;
struct ceph_write_io_size { … } __packed;
struct ceph_metric_head { … } __packed;
enum metric_type { … };
struct ceph_metric { … };
struct ceph_client_metric { … };
static inline void metric_schedule_delayed(struct ceph_client_metric *m)
{ … }
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)
{ … }
static inline void ceph_update_cap_mis(struct ceph_client_metric *m)
{ … }
extern void ceph_update_metrics(struct ceph_metric *m,
ktime_t r_start, ktime_t r_end,
unsigned int size, int rc);
static inline void ceph_update_read_metrics(struct ceph_client_metric *m,
ktime_t r_start, ktime_t r_end,
unsigned int size, int rc)
{ … }
static inline void ceph_update_write_metrics(struct ceph_client_metric *m,
ktime_t r_start, ktime_t r_end,
unsigned int size, int rc)
{ … }
static inline void ceph_update_metadata_metrics(struct ceph_client_metric *m,
ktime_t r_start, ktime_t r_end,
int rc)
{ … }
static inline void ceph_update_copyfrom_metrics(struct ceph_client_metric *m,
ktime_t r_start, ktime_t r_end,
unsigned int size, int rc)
{ … }
#endif