Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: add support for Verify command opcode
@ 2019-05-11  0:04 Kenneth Heitke
  2019-05-11  7:18 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Kenneth Heitke @ 2019-05-11  0:04 UTC (permalink / raw)


This allows the Verify command to be sent using the
NVME_IOCTL_SUBMIT_IO ioctl.

Signed-off-by: Kenneth Heitke <kenneth.heitke at intel.com>
---
 drivers/nvme/host/core.c  | 1 +
 drivers/nvme/host/trace.c | 1 +
 drivers/nvme/host/trace.h | 1 +
 include/linux/nvme.h      | 1 +
 4 files changed, 4 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index eebaeadaa800..8bbcae22fd22 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1193,6 +1193,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
 	switch (io.opcode) {
 	case nvme_cmd_write:
 	case nvme_cmd_read:
+	case nvme_cmd_verify:
 	case nvme_cmd_compare:
 		break;
 	default:
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 5f24ea7a28eb..07a963f5be96 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -127,6 +127,7 @@ const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
 	case nvme_cmd_read:
 	case nvme_cmd_write:
 	case nvme_cmd_write_zeroes:
+	case nvme_cmd_verify:
 		return nvme_trace_read_write(p, cdw10);
 	case nvme_cmd_dsm:
 		return nvme_trace_dsm(p, cdw10);
diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
index 97d3c77365b8..38636062435c 100644
--- a/drivers/nvme/host/trace.h
+++ b/drivers/nvme/host/trace.h
@@ -52,6 +52,7 @@
 		nvme_opcode_name(nvme_cmd_compare),		\
 		nvme_opcode_name(nvme_cmd_write_zeroes),	\
 		nvme_opcode_name(nvme_cmd_dsm),			\
+		nvme_opcode_name(nvme_cmd_verify),		\
 		nvme_opcode_name(nvme_cmd_resv_register),	\
 		nvme_opcode_name(nvme_cmd_resv_report),		\
 		nvme_opcode_name(nvme_cmd_resv_acquire),	\
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index c40720cb59ac..73520060bf7c 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -556,6 +556,7 @@ enum nvme_opcode {
 	nvme_cmd_compare	= 0x05,
 	nvme_cmd_write_zeroes	= 0x08,
 	nvme_cmd_dsm		= 0x09,
+	nvme_cmd_verify		= 0x0c,
 	nvme_cmd_resv_register	= 0x0d,
 	nvme_cmd_resv_report	= 0x0e,
 	nvme_cmd_resv_acquire	= 0x11,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] nvme: add support for Verify command opcode
  2019-05-11  0:04 [PATCH] nvme: add support for Verify command opcode Kenneth Heitke
@ 2019-05-11  7:18 ` Christoph Hellwig
  2019-05-11 18:48   ` Heitke, Kenneth
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2019-05-11  7:18 UTC (permalink / raw)


On Fri, May 10, 2019@06:04:06PM -0600, Kenneth Heitke wrote:
> This allows the Verify command to be sent using the
> NVME_IOCTL_SUBMIT_IO ioctl.
> 
> Signed-off-by: Kenneth Heitke <kenneth.heitke at intel.com>

I think we've decided that NVME_IOCTL_SUBMIT_IO is deprecated and
everyone should be using NVME_IOCTL_IO_CMD instead.

Maybe we need to add an official deprecating warnings (probably
just a printk_once, maybe per process name?)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] nvme: add support for Verify command opcode
  2019-05-11  7:18 ` Christoph Hellwig
@ 2019-05-11 18:48   ` Heitke, Kenneth
  0 siblings, 0 replies; 3+ messages in thread
From: Heitke, Kenneth @ 2019-05-11 18:48 UTC (permalink / raw)




On 5/11/2019 1:18 AM, Christoph Hellwig wrote:
> On Fri, May 10, 2019@06:04:06PM -0600, Kenneth Heitke wrote:
>> This allows the Verify command to be sent using the
>> NVME_IOCTL_SUBMIT_IO ioctl.
>>
>> Signed-off-by: Kenneth Heitke <kenneth.heitke at intel.com>
> 
> I think we've decided that NVME_IOCTL_SUBMIT_IO is deprecated and
> everyone should be using NVME_IOCTL_IO_CMD instead.
> 
> Maybe we need to add an official deprecating warnings (probably
> just a printk_once, maybe per process name?)
> 

Thanks! I wasn't sure which was the preferred ioctl to use and didn't 
realize that SUMBIT_IO was considered deprecated.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-11 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-11  0:04 [PATCH] nvme: add support for Verify command opcode Kenneth Heitke
2019-05-11  7:18 ` Christoph Hellwig
2019-05-11 18:48   ` Heitke, Kenneth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox