diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-06-10 04:32:52 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-06-17 16:51:21 +0300 |
commit | aaf2e048af2704da5869f27b508b288f36d5c7b7 (patch) | |
tree | 9472499bc11e51d3866fb6b96c957da588822efc /include/linux/nvme.h | |
parent | ab5d0b38c0475d6ff59f1a6ccf7c668b9ec2e0a4 (diff) | |
download | linux-aaf2e048af2704da5869f27b508b288f36d5c7b7.tar.xz |
nvmet: add ZBD over ZNS backend support
NVMe TP 4053 – Zoned Namespaces (ZNS) allows host software to
communicate with a non-volatile memory subsystem using zones for NVMe
protocol-based controllers. NVMeOF already support the ZNS NVMe
Protocol compliant devices on the target in the passthru mode. There
are generic zoned block devices like Shingled Magnetic Recording (SMR)
HDDs that are not based on the NVMe protocol.
This patch adds ZNS backend support for non-ZNS zoned block devices as
NVMeOF targets.
This support includes implementing the new command set NVME_CSI_ZNS,
adding different command handlers for ZNS command set such as NVMe
Identify Controller, NVMe Identify Namespace, NVMe Zone Append,
NVMe Zone Management Send and NVMe Zone Management Receive.
With the new command set identifier, we also update the target command
effects logs to reflect the ZNS compliant commands.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r-- | include/linux/nvme.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index c7ba83144d52..cb1197f1cfed 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -944,6 +944,13 @@ struct nvme_zone_mgmt_recv_cmd { enum { NVME_ZRA_ZONE_REPORT = 0, NVME_ZRASF_ZONE_REPORT_ALL = 0, + NVME_ZRASF_ZONE_STATE_EMPTY = 0x01, + NVME_ZRASF_ZONE_STATE_IMP_OPEN = 0x02, + NVME_ZRASF_ZONE_STATE_EXP_OPEN = 0x03, + NVME_ZRASF_ZONE_STATE_CLOSED = 0x04, + NVME_ZRASF_ZONE_STATE_READONLY = 0x05, + NVME_ZRASF_ZONE_STATE_FULL = 0x06, + NVME_ZRASF_ZONE_STATE_OFFLINE = 0x07, NVME_REPORT_ZONE_PARTIAL = 1, }; |