]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
types: use nvme_timestamp for fdp events
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 26 Jan 2023 08:18:06 +0000 (09:18 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 26 Jan 2023 08:18:06 +0000 (09:18 +0100)
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 <k.jensen@samsung.com>
src/nvme/types.h

index d5da3259395ca052f91cf3b132050d0052790a41..85b3fe82be238ee6ef848ee3a7559f0cdf0ff45f 100644 (file)
@@ -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