summaryrefslogtreecommitdiff
path: root/fs/ceph/metric.h
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2020-07-16 10:05:58 -0400
committerIlya Dryomov <idryomov@gmail.com>2020-08-03 11:05:27 +0200
commit3b4168dd8b1d3e0bb129cf41e6bb50e217fe7781 (patch)
tree55a08fb12f646b5b42c78fb172f664ff9dbf0d68 /fs/ceph/metric.h
parent18f473b384a64cef69f166a3e2b73d3d2eca82c6 (diff)
ceph: send client provided metric flags in client metadata
Send metric flags to the MDS, indicating what metrics the client supports. Currently that consists of cap statistics, and read, write and metadata latencies. URL: https://tracker.ceph.com/issues/43435 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
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 fe5d07d2e63a..1d0959d669d7 100644
--- a/fs/ceph/metric.h
+++ b/fs/ceph/metric.h
@@ -18,6 +18,19 @@ enum ceph_metric_type {
CLIENT_METRIC_TYPE_MAX = CLIENT_METRIC_TYPE_DENTRY_LEASE,
};
+/*
+ * This will always have the highest metric bit value
+ * as the last element of the array.
+ */
+#define CEPHFS_METRIC_SPEC_CLIENT_SUPPORTED { \
+ CLIENT_METRIC_TYPE_CAP_INFO, \
+ CLIENT_METRIC_TYPE_READ_LATENCY, \
+ CLIENT_METRIC_TYPE_WRITE_LATENCY, \
+ CLIENT_METRIC_TYPE_METADATA_LATENCY, \
+ \
+ CLIENT_METRIC_TYPE_MAX, \
+}
+
/* metric caps header */
struct ceph_metric_cap {
__le32 type; /* ceph metric type */