summaryrefslogtreecommitdiffstats
path: root/fs/ceph/metric.h
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2022-03-08 07:42:16 -0500
committerIlya Dryomov <idryomov@gmail.com>2022-03-21 13:35:16 +0100
commit8d728c769fd8e5aaaea36288741a4e3493111816 (patch)
tree5dbc42cf67945ad2935dde1e35bb49411ef7cb4f /fs/ceph/metric.h
parent1ad3bb28d336978e451980ca6c72be494b8fe2f1 (diff)
downloadlinux-8d728c769fd8e5aaaea36288741a4e3493111816.tar.gz
linux-8d728c769fd8e5aaaea36288741a4e3493111816.tar.bz2
linux-8d728c769fd8e5aaaea36288741a4e3493111816.zip
ceph: use ktime_to_timespec64() rather than jiffies_to_timespec64()
Latencies are of type ktime_t, coverting from jiffies is incorrect. Also, switch to "struct ceph_timespec" for r/w/m latencies. Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/metric.h')
-rw-r--r--fs/ceph/metric.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/ceph/metric.h b/fs/ceph/metric.h
index bb45608181e7..5b2bb2897056 100644
--- a/fs/ceph/metric.h
+++ b/fs/ceph/metric.h
@@ -2,7 +2,7 @@
#ifndef _FS_CEPH_MDS_METRIC_H
#define _FS_CEPH_MDS_METRIC_H
-#include <linux/types.h>
+#include <linux/ceph/types.h>
#include <linux/percpu_counter.h>
#include <linux/ktime.h>
@@ -60,22 +60,19 @@ struct ceph_metric_cap {
/* metric read latency header */
struct ceph_metric_read_latency {
struct ceph_metric_header header;
- __le32 sec;
- __le32 nsec;
+ struct ceph_timespec lat;
} __packed;
/* metric write latency header */
struct ceph_metric_write_latency {
struct ceph_metric_header header;
- __le32 sec;
- __le32 nsec;
+ struct ceph_timespec lat;
} __packed;
/* metric metadata latency header */
struct ceph_metric_metadata_latency {
struct ceph_metric_header header;
- __le32 sec;
- __le32 nsec;
+ struct ceph_timespec lat;
} __packed;
/* metric dentry lease header */