summaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2023-04-07 15:05:40 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2023-04-11 21:55:35 -0400
commitf2bf2e7e2d526116aab942aaf1b71a949a570ba6 (patch)
treea1092b204a332d144e68b674745fe646464cfec1 /include/linux/nvme.h
parent8a8da082e9e46fb8c246822145a2e4920a8d03d5 (diff)
downloadlinux-stable-f2bf2e7e2d526116aab942aaf1b71a949a570ba6.tar.gz
linux-stable-f2bf2e7e2d526116aab942aaf1b71a949a570ba6.tar.bz2
linux-stable-f2bf2e7e2d526116aab942aaf1b71a949a570ba6.zip
nvme: Fix reservation status related structs
This fixes the following issues with the reservation status structs: 1. resv10 is bytes 23:10 so it should be 14 bytes. 2. regctl_ds only supports 64 bit host IDs. These are not currently used, but will be in this patchset which adds support for the reservation report command. Signed-off-by: Mike Christie <michael.christie@oracle.com> Link: https://lore.kernel.org/r/20230407200551.12660-8-michael.christie@oracle.com Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 4fad4aa245fb..57b5b2b8d95b 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -759,20 +759,42 @@ enum {
NVME_LBART_ATTRIB_HIDE = 1 << 1,
};
+struct nvme_registered_ctrl {
+ __le16 cntlid;
+ __u8 rcsts;
+ __u8 rsvd3[5];
+ __le64 hostid;
+ __le64 rkey;
+};
+
struct nvme_reservation_status {
__le32 gen;
__u8 rtype;
__u8 regctl[2];
__u8 resv5[2];
__u8 ptpls;
- __u8 resv10[13];
- struct {
- __le16 cntlid;
- __u8 rcsts;
- __u8 resv3[5];
- __le64 hostid;
- __le64 rkey;
- } regctl_ds[];
+ __u8 resv10[14];
+ struct nvme_registered_ctrl regctl_ds[];
+};
+
+struct nvme_registered_ctrl_ext {
+ __le16 cntlid;
+ __u8 rcsts;
+ __u8 rsvd3[5];
+ __le64 rkey;
+ __u8 hostid[16];
+ __u8 rsvd32[32];
+};
+
+struct nvme_reservation_status_ext {
+ __le32 gen;
+ __u8 rtype;
+ __u8 regctl[2];
+ __u8 resv5[2];
+ __u8 ptpls;
+ __u8 resv10[14];
+ __u8 rsvd24[40];
+ struct nvme_registered_ctrl_ext regctl_eds[];
};
enum nvme_async_event_type {