summaryrefslogtreecommitdiff
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2023-04-07 23:05:45 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-04-12 04:55:36 +0300
commitbe1a7cd2d0ed028ffdd60c65e3734e2a1d8b17df (patch)
tree04e1f9d69d13cef94f0359b160764ce7da75cfb6 /include/linux/nvme.h
parent5fd96a4e15de8442915a912233d800c56f49001d (diff)
downloadlinux-be1a7cd2d0ed028ffdd60c65e3734e2a1d8b17df.tar.xz
nvme: Add a nvme_pr_type enum
The next patch adds support to report the reservation type, so we need to be able to convert from the NVMe PR value we get from the device to the linux block layer PR value that will be returned to callers. To prepare for that, this patch adds a nvme_pr_type enum and renames the nvme_pr_type function. Signed-off-by: Mike Christie <michael.christie@oracle.com> Link: https://lore.kernel.org/r/20230407200551.12660-13-michael.christie@oracle.com Reviewed-by: Chaitanya Kulkarni <kch@nvidia.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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index a617e250d629..4013abb86642 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -759,6 +759,15 @@ enum {
NVME_LBART_ATTRIB_HIDE = 1 << 1,
};
+enum nvme_pr_type {
+ NVME_PR_WRITE_EXCLUSIVE = 1,
+ NVME_PR_EXCLUSIVE_ACCESS = 2,
+ NVME_PR_WRITE_EXCLUSIVE_REG_ONLY = 3,
+ NVME_PR_EXCLUSIVE_ACCESS_REG_ONLY = 4,
+ NVME_PR_WRITE_EXCLUSIVE_ALL_REGS = 5,
+ NVME_PR_EXCLUSIVE_ACCESS_ALL_REGS = 6,
+};
+
enum nvme_eds {
NVME_EXTENDED_DATA_STRUCT = 0x1,
};