Thread (35 messages) 35 messages, 4 authors, 2023-09-11

Re: [PATCH v15 08/12] nvmet: add copy command support for bdev and file ns

From: Hannes Reinecke <hare@suse.de>
Date: 2023-09-08 06:11:15
Also in: dm-devel, linux-doc, linux-fsdevel, linux-nvme, lkml

On 9/6/23 18:38, Nitesh Shetty wrote:
Add support for handling nvme_cmd_copy command on target.

For bdev-ns if backing device supports copy offload we call device copy
offload (blkdev_copy_offload).
In case of partial completion from above or absence of device copy offload
capability, we fallback to copy emulation (blkdev_copy_emulation)

For file-ns we call vfs_copy_file_range to service our request.

Currently target always shows copy capability by setting
NVME_CTRL_ONCS_COPY in controller ONCS.

loop target has copy support, which can be used to test copy offload.
trace event support for nvme_cmd_copy.

Signed-off-by: Nitesh Shetty <redacted>
Signed-off-by: Anuj Gupta <redacted>
---
  drivers/nvme/target/admin-cmd.c   |  9 ++-
  drivers/nvme/target/io-cmd-bdev.c | 97 +++++++++++++++++++++++++++++++
  drivers/nvme/target/io-cmd-file.c | 50 ++++++++++++++++
  drivers/nvme/target/nvmet.h       |  4 ++
  drivers/nvme/target/trace.c       | 19 ++++++
  5 files changed, 177 insertions(+), 2 deletions(-)
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help