From dc04d25e2f3f7e26f7f97b860992076b5f04afdb Mon Sep 17 00:00:00 2001 From: Minwoo Im Date: Fri, 12 Feb 2021 13:11:39 +0100 Subject: hw/block/nvme: add support for the format nvm command Format NVM admin command can make a namespace or namespaces to be with different LBA size and metadata size with protection information types. This patch introduces Format NVM command with LBA format, Metadata, and Protection Information for the device. The secure erase operation things and support for formatting zoned namespaces are yet to be added. The parameter checks inside of this patch has been referred from Keith's old branch. Signed-off-by: Minwoo Im [anaidu.gollu: rebased on e2e] Signed-off-by: Gollu Appalanaidu [k.jensen: rebased for reworked aio tracking] Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- include/block/nvme.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/block') diff --git a/include/block/nvme.h b/include/block/nvme.h index ba757b32db..b0a4e42916 100644 --- a/include/block/nvme.h +++ b/include/block/nvme.h @@ -828,6 +828,7 @@ enum NvmeStatusCodes { NVME_CAP_EXCEEDED = 0x0081, NVME_NS_NOT_READY = 0x0082, NVME_NS_RESV_CONFLICT = 0x0083, + NVME_FORMAT_IN_PROGRESS = 0x0084, NVME_INVALID_CQID = 0x0100, NVME_INVALID_QID = 0x0101, NVME_MAX_QSIZE_EXCEEDED = 0x0102, -- cgit v1.2.3-55-g7522