linux/fs/ceph/metric.h

/* SPDX-License-Identifier: GPL-2.0 */
#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 {};

/*
 * This will always have the highest metric bit value
 * as the last element of the array.
 */
#define CEPHFS_METRIC_SPEC_CLIENT_SUPPORTED

struct ceph_metric_header {} __packed;

/* metric caps header */
struct ceph_metric_cap {} __packed;

/* metric read latency header */
struct ceph_metric_read_latency {} __packed;

/* metric write latency header */
struct ceph_metric_write_latency {} __packed;

/* metric metadata latency header */
struct ceph_metric_metadata_latency {} __packed;

/* metric dentry lease header */
struct ceph_metric_dlease {} __packed;

/* metric opened files header */
struct ceph_opened_files {} __packed;

/* metric pinned i_caps header */
struct ceph_pinned_icaps {} __packed;

/* metric opened inodes header */
struct ceph_opened_inodes {} __packed;

/* metric read io size header */
struct ceph_read_io_size {} __packed;

/* metric write io size header */
struct ceph_write_io_size {} __packed;

struct ceph_metric_head {} __packed;

enum metric_type {};

struct ceph_metric {};

/* This is the global metrics */
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 /* _FS_CEPH_MDS_METRIC_H */