From d287eacb3686bb673703005c2cf15e2e3021e5ae Mon Sep 17 00:00:00 2001 From: Klaus Jensen Date: Thu, 26 Jan 2023 09:18:06 +0100 Subject: [PATCH] types: use nvme_timestamp for fdp events The timestamp member of nvme_fdp_event is a proper NVMe Timestamp, so use the actual data structure for it. Signed-off-by: Klaus Jensen --- src/nvme/types.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/nvme/types.h b/src/nvme/types.h index d5da3259..85b3fe82 100644 --- a/src/nvme/types.h +++ b/src/nvme/types.h @@ -3368,6 +3368,18 @@ struct nvme_fw_commit_event { __le16 vndr_assign_fw_commit_rc; } __attribute__((packed)); +/** + * struct nvme_timestamp - Timestamp - Data Structure for Get Features + * @timestamp: Timestamp value based on origin and synch field + * @attr: Attribute + * @rsvd: Reserved + */ +struct nvme_timestamp { + __u8 timestamp[6]; + __u8 attr; + __u8 rsvd; +}; + /** * struct nvme_time_stamp_change_event - Timestamp Change Event * @previous_timestamp: Previous Timestamp @@ -4276,7 +4288,7 @@ enum nvme_fdp_event_flags { * @type: Event Type (&enum nvme_fdp_event_type) * @flags: Event Flags (&enum nvme_fdp_event_flags) * @pid: Placement Identifier - * @timestamp: Timestamp + * @ts: Timestamp * @nsid: Namespace Identifier * @type_specific: Event Type Specific Information * @rgid: Reclaim Group Identifier @@ -4288,7 +4300,7 @@ struct nvme_fdp_event { __u8 type; __u8 flags; __u16 pid; - __u64 timestamp; + struct nvme_timestamp ts; __u32 nsid; __u8 type_specific[16]; __u16 rgid; @@ -4513,18 +4525,6 @@ enum nvme_ns_metadata_type { NVME_NS_METADATA_OS_NS_QUAL_2 = 0x04, }; -/** - * struct nvme_timestamp - Timestamp - Data Structure for Get Features - * @timestamp: Timestamp value based on origin and synch field - * @attr: Attribute - * @rsvd: Reserved - */ -struct nvme_timestamp { - __u8 timestamp[6]; - __u8 attr; - __u8 rsvd; -}; - /** * struct nvme_lba_range_type_entry - LBA Range Type - Data Structure Entry * @type: Specifies the Type of the LBA range -- 2.51.0