Re: [PATCH] dm: fix a crash if blk_alloc_disk fails

2024-10-08 Thread Nitesh Shetty
o access it, causing a crash on this statement "md->disk->private_data = NULL;". Signed-off-by: Mikulas Patocka Reported-by: Chenyuan Yang Closes: https://marc.info/?l=dm-devel&m=172824125004329&w=2 Cc: sta...@vger.kernel.org Reviewed-by: Nitesh Shetty

Re: [PATCH -next] dm: Make use of __assign_bit() API

2024-09-02 Thread Nitesh Shetty
: Nitesh Shetty

Re: dm/002: add --retry option to dmsetup remove command

2024-07-24 Thread Nitesh Shetty
n Broz Signed-off-by: Shin'ichiro Kawasaki --- This patch addresses a failure found during the debug work for another dm/002 failure [1]. [1] https://lore.kernel.org/linux-block/42ecobcsduvlqh77iavjj2p3ewdh7u4opdz4xruauz4u5ddljz@yr7ye4fq72tr/ Tested-by: Nitesh Shetty Changes from v2: *

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-06-24 Thread Nitesh Shetty
eaches blk_mq_submit_bio, this will retrieve the destination BIO from bi_copy_ctx and form a request with destination BIO and source BIO. After this request will be sent to driver. This work is still in POC phase[2]. But this approach makes lifetime management of BIO complicated, especially durin

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-06-06 Thread Nitesh Shetty
ence chain won't be maintained. [1] https://lore.kernel.org/all/d7ae00c8-c038-4bed-937e-51bc6...@acm.org/ Thank You, Nitesh Shetty

Re: [PATCH v20 03/12] block: add copy offload support

2024-06-04 Thread Nitesh Shetty
_end_io = blkdev_copy_offload_src_endio; + src_bio->bi_private = offload_io; + + atomic_inc(&cio->refcount); + submit_bio(src_bio); + blk_finish_plug(&plug); plugs should be hold over all I/Os, submitted from the same caller, which is the point of them. Acked Thank You, Nitesh Shetty

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-06-03 Thread Nitesh Shetty
On 01/06/24 07:53AM, Christoph Hellwig wrote: On Mon, May 20, 2024 at 03:50:14PM +0530, Nitesh Shetty wrote: Add device limits as sysfs entries, - copy_max_bytes (RW) - copy_max_hw_bytes (RO) Above limits help to split the copy payload in block layer. copy_max_bytes: maximum

Re: [PATCH v20 07/12] nvme: add copy offload support

2024-06-03 Thread Nitesh Shetty
On 01/06/24 08:22AM, Christoph Hellwig wrote: On Mon, May 20, 2024 at 03:50:20PM +0530, Nitesh Shetty wrote: + if (blk_rq_nr_phys_segments(req) != BLK_COPY_MAX_SEGMENTS) + return BLK_STS_IOERR; This sounds like BLK_COPY_MAX_SEGMENTS is misnamed. Right now this is not a

Re: [PATCH v20 11/12] null: Enable trace capability for null block

2024-06-03 Thread Nitesh Shetty
On 01/06/24 08:23AM, Christoph Hellwig wrote: On Mon, May 20, 2024 at 03:50:24PM +0530, Nitesh Shetty wrote: This is a prep patch to enable copy trace capability. At present only zoned null_block is using trace, so we decoupled trace and zoned dependency to make it usable in null_blk driver

Re: [PATCH v20 00/12] Implement copy offload support

2024-06-03 Thread Nitesh Shetty
On 01/06/24 07:47AM, Christoph Hellwig wrote: On Mon, May 20, 2024 at 03:50:13PM +0530, Nitesh Shetty wrote: So copy offload works only for request based storage drivers. I don't think that is actually true. It just requires a fair amount of code in a bio based driver to match the bi

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-31 Thread Nitesh Shetty
On 30/05/24 10:11AM, Bart Van Assche wrote: On 5/30/24 00:16, Nitesh Shetty wrote: +static inline bool blk_copy_offload_attempt_combine(struct request_queue *q, + struct bio *bio) +{ +    struct blk_plug *plug = current->plug; +    struct request *rq; + +    if (!p

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-30 Thread Nitesh Shetty
On 29/05/24 03:41PM, Bart Van Assche wrote: On 5/29/24 12:48 AM, Damien Le Moal wrote: On 5/29/24 15:17, Nitesh Shetty wrote: On 24/05/24 01:33PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: We add two new opcode REQ_OP_COPY_DST, REQ_OP_COPY_SRC. Since copy is a composite

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-28 Thread Nitesh Shetty
On 24/05/24 01:33PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: We add two new opcode REQ_OP_COPY_DST, REQ_OP_COPY_SRC. Since copy is a composite operation involving src and dst sectors/lba, each needs to be represented by a separate bio to make it compatible with device

Re: [PATCH v20 05/12] fs/read_write: Enable copy_file_range for block device.

2024-05-27 Thread Nitesh Shetty
On 26/05/24 09:02AM, Dave Chinner wrote: On Mon, May 20, 2024 at 03:50:18PM +0530, Nitesh Shetty wrote: From: Anuj Gupta This is a prep patch. Allow copy_file_range to work for block devices. Relaxing generic_copy_file_checks allows us to reuse the existing infra, instead of adding a new user

Re: [PATCH v20 06/12] fs, block: copy_file_range for def_blk_ops for direct block device

2024-05-27 Thread Nitesh Shetty
On 26/05/24 09:09AM, Dave Chinner wrote: On Mon, May 20, 2024 at 03:50:19PM +0530, Nitesh Shetty wrote: For direct block device opened with O_DIRECT, use blkdev_copy_offload to issue device copy offload, or use splice_copy_file_range in case device copy offload capability is absent or the

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-27 Thread Nitesh Shetty
On 24/05/24 06:52AM, Bart Van Assche wrote: On 5/23/24 23:54, Nitesh Shetty wrote: Regarding merge, does it looks any better, if we use single request operation such as REQ_OP_COPY and use op_flags(REQ_COPY_DST/REQ_COPY_SRC) to identify dst and src bios ? I prefer to keep the current approach

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-24 Thread Nitesh Shetty
On 21/05/24 09:01AM, Hannes Reinecke wrote: On 5/20/24 12:20, Nitesh Shetty wrote: We add two new opcode REQ_OP_COPY_DST, REQ_OP_COPY_SRC. Since copy is a composite operation involving src and dst sectors/lba, each needs to be represented by a separate bio to make it compatible with device

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-23 Thread Nitesh Shetty
On 22/05/24 11:05AM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: We add two new opcode REQ_OP_COPY_DST, REQ_OP_COPY_SRC. Since copy is a composite operation involving src and dst sectors/lba, each needs to be represented by a separate bio to make it compatible with device

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-23 Thread Nitesh Shetty
On 22/05/24 10:49AM, Bart Van Assche wrote: On 5/21/24 07:25, Nitesh Shetty wrote: On 20/05/24 03:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: +    if (max_copy_bytes & (queue_logical_block_size(q) - 1)) +    return -EINVAL; Wouldn't it be more user-fr

Re: [PATCH v20 12/12] null_blk: add support for copy offload

2024-05-23 Thread Nitesh Shetty
On 22/05/24 10:52AM, Bart Van Assche wrote: On 5/21/24 07:46, Nitesh Shetty wrote: On 20/05/24 04:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: +    __rq_for_each_bio(bio, req) { +    if (seg == blk_rq_nr_phys_segments(req)) { +    sector_in = bio

Re: [PATCH v20 09/12] dm: Add support for copy offload

2024-05-22 Thread Nitesh Shetty
On 22/05/24 08:22AM, Hannes Reinecke wrote: On 5/21/24 16:08, Nitesh Shetty wrote: On 21/05/24 09:11AM, Hannes Reinecke wrote: On 5/20/24 12:20, Nitesh Shetty wrote: Before enabling copy for dm target, check if underlying devices and dm target support copy. Avoid split happening inside dm

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-21 Thread Nitesh Shetty
On 20/05/24 04:33PM, Damien Le Moal wrote: On 2024/05/20 12:20, Nitesh Shetty wrote: @@ -231,10 +237,11 @@ int blk_set_default_limits(struct queue_limits *lim) { /* * Most defaults are set by capping the bounds in blk_validate_limits, -* but max_user_discard_sectors is

Re: [PATCH v20 10/12] dm: Enable copy offload for dm-linear target

2024-05-21 Thread Nitesh Shetty
On 20/05/24 04:25PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: Setting copy_offload_supported flag to enable offload. I think that the description of this patch should explain why it is safe to set the 'copy_offload_supported' flag for the dm-linear driver. A

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-21 Thread Nitesh Shetty
On 20/05/24 03:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: +static ssize_t queue_copy_max_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%llu\n", (unsigned long long) + q->limits.max_copy_sectors &l

Re: [PATCH v20 12/12] null_blk: add support for copy offload

2024-05-21 Thread Nitesh Shetty
On 20/05/24 04:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: + if (blk_rq_nr_phys_segments(req) != BLK_COPY_MAX_SEGMENTS) + return status; Why is this check necessary? + /* +* First bio contains information about destination and last

Re: [PATCH v20 09/12] dm: Add support for copy offload

2024-05-21 Thread Nitesh Shetty
On 21/05/24 09:11AM, Hannes Reinecke wrote: On 5/20/24 12:20, Nitesh Shetty wrote: Before enabling copy for dm target, check if underlying devices and dm target support copy. Avoid split happening inside dm target. Fail early if the request needs split, currently splitting copy request is not

Re: [PATCH v20 04/12] block: add emulation for copy

2024-05-21 Thread Nitesh Shetty
On 21/05/24 09:06AM, Hannes Reinecke wrote: On 5/20/24 12:20, Nitesh Shetty wrote: For the devices which does not support copy, copy emulation is added. It is required for in-kernel users like fabrics, where file descriptor is not available and hence they can't use copy_file_range.

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-21 Thread Nitesh Shetty
On 20/05/24 04:00PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: Upon arrival of source bio we merge these two bio's and send corresponding request down to device driver. bios with different operation types must not be merged. Copy is a composite operation which ha

Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-21 Thread Nitesh Shetty
On 20/05/24 05:00PM, Damien Le Moal wrote: On 2024/05/20 12:20, Nitesh Shetty wrote: We add two new opcode REQ_OP_COPY_DST, REQ_OP_COPY_SRC. Since copy is a composite operation involving src and dst sectors/lba, each needs to be represented by a separate bio to make it compatible with device

[PATCH v20 12/12] null_blk: add support for copy offload

2024-05-20 Thread Nitesh Shetty
tracing. Reviewed-by: Hannes Reinecke Suggested-by: Damien Le Moal Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty Signed-off-by: Vincent Fu --- Documentation/block/null_blk.rst | 5 ++ drivers/block/null_blk/main.c | 102 +- drivers/block/null_blk

[PATCH v20 11/12] null: Enable trace capability for null block

2024-05-20 Thread Nitesh Shetty
This is a prep patch to enable copy trace capability. At present only zoned null_block is using trace, so we decoupled trace and zoned dependency to make it usable in null_blk driver also. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- drivers/block

[PATCH v20 10/12] dm: Enable copy offload for dm-linear target

2024-05-20 Thread Nitesh Shetty
Setting copy_offload_supported flag to enable offload. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty --- drivers/md/dm-linear.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 2d3e186ca87e..cfec2fac28e1 100644 --- a/drivers

[PATCH v20 09/12] dm: Add support for copy offload

2024-05-20 Thread Nitesh Shetty
Before enabling copy for dm target, check if underlying devices and dm target support copy. Avoid split happening inside dm target. Fail early if the request needs split, currently splitting copy request is not supported. Signed-off-by: Nitesh Shetty --- drivers/md/dm-table.c | 37

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

2024-05-20 Thread Nitesh Shetty
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. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty

[PATCH v20 07/12] nvme: add copy offload support

2024-05-20 Thread Nitesh Shetty
Reinecke Signed-off-by: Kanchan Joshi Signed-off-by: Nitesh Shetty Signed-off-by: Javier González Signed-off-by: Anuj Gupta --- drivers/nvme/host/constants.c | 1 + drivers/nvme/host/core.c | 81 ++- drivers/nvme/host/trace.c | 19 include/linux

[PATCH v20 06/12] fs, block: copy_file_range for def_blk_ops for direct block device

2024-05-20 Thread Nitesh Shetty
: Nitesh Shetty --- block/fops.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/block/fops.c b/block/fops.c index 376265935714..5a4bba4f43aa 100644 --- a/block/fops.c +++ b/block/fops.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "

[PATCH v20 05/12] fs/read_write: Enable copy_file_range for block device.

2024-05-20 Thread Nitesh Shetty
r both inode_in and inode_out. Allow block device in generic_file_rw_checks. Reviewed-by: Hannes Reinecke Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty --- fs/read_write.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c

[PATCH v20 04/12] block: add emulation for copy

2024-05-20 Thread Nitesh Shetty
nding destination. At present in kernel user of emulation is fabrics. Signed-off-by: Nitesh Shetty Signed-off-by: Vincent Fu Signed-off-by: Anuj Gupta --- block/blk-lib.c| 223 + include/linux/blkdev.h | 4 + 2 files changed, 227 insertions(+)

[PATCH v20 03/12] block: add copy offload support

2024-05-20 Thread Nitesh Shetty
reason, if a request comes to the driver with only one of src/dst bio, we fail the copy offload. Larger copy will be divided, based on max_copy_sectors limit. Reviewed-by: Hannes Reinecke Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty --- block/blk-lib.c| 204

[PATCH v20 02/12] Add infrastructure for copy offload in block and request layer.

2024-05-20 Thread Nitesh Shetty
merge function. Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- block/blk-core.c | 7 +++ block/blk-merge.c | 41 +++ block/blk.h | 16 +++ block/elevator.h | 1 + include/linux/bio.h

[PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-20 Thread Nitesh Shetty
-off-by: Nitesh Shetty Signed-off-by: Kanchan Joshi Signed-off-by: Anuj Gupta --- Documentation/ABI/stable/sysfs-block | 23 +++ block/blk-settings.c | 34 -- block/blk-sysfs.c| 43 include/linux

[PATCH v20 00/12] Implement copy offload support

2024-05-20 Thread Nitesh Shetty
94648.15614-1-nj.she...@samsung.com/ [1] https://lore.kernel.org/linux-nvme/20231222061313.12260-1-nj.she...@samsung.com/ [2] https://qemu-project.gitlab.io/qemu/system/devices/nvme.html#simple-copy [3] https://github.com/nitesh-shetty/blktests/tree/feat/copy_offload/v19 [4

[PATCH v19 12/12] null_blk: add support for copy offload

2023-12-21 Thread Nitesh Shetty
tracing. Reviewed-by: Hannes Reinecke Suggested-by: Damien Le Moal Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty Signed-off-by: Vincent Fu --- Documentation/block/null_blk.rst | 5 ++ drivers/block/null_blk/main.c | 97 ++- drivers/block/null_blk

[PATCH v19 11/12] null: Enable trace capability for null block

2023-12-21 Thread Nitesh Shetty
This is a prep patch to enable copy trace capability. At present only zoned null_block is using trace, so we decoupled trace and zoned dependency to make it usable in null_blk driver also. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- drivers/block

[PATCH v19 10/12] dm: Enable copy offload for dm-linear target

2023-12-21 Thread Nitesh Shetty
Setting copy_offload_supported flag to enable offload. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty --- drivers/md/dm-linear.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 2d3e186ca87e..cfec2fac28e1 100644 --- a/drivers

[PATCH v19 09/12] dm: Add support for copy offload

2023-12-21 Thread Nitesh Shetty
Before enabling copy for dm target, check if underlying devices and dm target support copy. Avoid split happening inside dm target. Fail early if the request needs split, currently splitting copy request is not supported. Signed-off-by: Nitesh Shetty --- drivers/md/dm-table.c | 37

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

2023-12-21 Thread Nitesh Shetty
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. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty

[PATCH v19 07/12] nvme: add copy offload support

2023-12-21 Thread Nitesh Shetty
Reinecke Signed-off-by: Kanchan Joshi Signed-off-by: Nitesh Shetty Signed-off-by: Javier González Signed-off-by: Anuj Gupta --- drivers/nvme/host/constants.c | 1 + drivers/nvme/host/core.c | 79 +++ drivers/nvme/host/trace.c | 19 + include/linux

[PATCH v19 06/12] fs, block: copy_file_range for def_blk_ops for direct block device

2023-12-21 Thread Nitesh Shetty
: Nitesh Shetty --- block/fops.c | 25 + 1 file changed, 25 insertions(+) diff --git a/block/fops.c b/block/fops.c index 0abaac705daf..6ca46ea1f358 100644 --- a/block/fops.c +++ b/block/fops.c @@ -747,6 +747,30 @@ static ssize_t blkdev_read_iter(struct kiocb *iocb, struct

[PATCH v19 05/12] fs/read_write: Enable copy_file_range for block device.

2023-12-21 Thread Nitesh Shetty
r both inode_in and inode_out. Allow block device in generic_file_rw_checks. Reviewed-by: Hannes Reinecke Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty --- fs/read_write.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c

[PATCH v19 04/12] block: add emulation for copy

2023-12-21 Thread Nitesh Shetty
nding destination. At present in kernel user of emulation is fabrics. Signed-off-by: Nitesh Shetty Signed-off-by: Vincent Fu Signed-off-by: Anuj Gupta --- block/blk-lib.c| 223 + include/linux/blkdev.h | 4 + 2 files changed, 227 insertions(+)

[PATCH v19 03/12] block: add copy offload support

2023-12-21 Thread Nitesh Shetty
reason, if a request comes to the driver with only one of src/dst bio, we fail the copy offload. Larger copy will be divided, based on max_copy_sectors limit. Reviewed-by: Hannes Reinecke Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty --- block/blk-lib.c| 204

[PATCH v19 02/12] Add infrastructure for copy offload in block and request layer.

2023-12-21 Thread Nitesh Shetty
merge function. Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- block/blk-core.c | 7 +++ block/blk-merge.c | 41 +++ block/blk.h | 16 +++ block/elevator.h | 1 + include/linux/bio.h

[PATCH v19 01/12] block: Introduce queue limits and sysfs for copy-offload support

2023-12-21 Thread Nitesh Shetty
-by: Hannes Reinecke Reviewed-by: Luis Chamberlain Signed-off-by: Nitesh Shetty Signed-off-by: Kanchan Joshi Signed-off-by: Anuj Gupta --- Documentation/ABI/stable/sysfs-block | 23 ++ block/blk-settings.c | 24 +++ block/blk-sysfs.c

[PATCH v19 00/12] Implement copy offload support

2023-12-21 Thread Nitesh Shetty
20231206100253.13100-1-josh...@samsung.com/ [2] https://qemu-project.gitlab.io/qemu/system/devices/nvme.html#simple-copy [3] https://github.com/nitesh-shetty/blktests/tree/feat/copy_offload/v19 [4] https://github.com/OpenMPDK/fio/tree/copyoffload-3.35-v1

Re: [PATCH v18 02/12] Add infrastructure for copy offload in block and request layer.

2023-12-16 Thread Nitesh Shetty
Q_OP_COPY_SRC = (__force blk_opf_t)19, >>> >>> Should this be an even numbered OP? The odd ones are for data >>> WRITEs. Our request opcode needs to be write based(even) so that while forming nvme-tcp packets we send this as part of the nvme capsule. But now I think this design can be simplified as you suggested, if we align COPY_SRC to even and COPY_DST to odd. This requires us to change the design by sending dst bio first hence forming a write based request, followed by src bio's. Will send a follow up series next week fixing this. Thank you, Nitesh Shetty

[PATCH v17 05/12] fs/read_write: Enable copy_file_range for block device.

2023-10-19 Thread Nitesh Shetty
r both inode_in and inode_out. Allow block device in generic_file_rw_checks. Reviewed-by: Hannes Reinecke Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty --- fs/read_write.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c

[PATCH v17 06/12] fs, block: copy_file_range for def_blk_ops for direct block device

2023-10-19 Thread Nitesh Shetty
: Nitesh Shetty --- block/fops.c | 25 + 1 file changed, 25 insertions(+) diff --git a/block/fops.c b/block/fops.c index 73e42742543f..662d36a251a3 100644 --- a/block/fops.c +++ b/block/fops.c @@ -735,6 +735,30 @@ static ssize_t blkdev_read_iter(struct kiocb *iocb, struct

[PATCH v17 12/12] null_blk: add support for copy offload

2023-10-19 Thread Nitesh Shetty
tracing. Reviewed-by: Hannes Reinecke Suggested-by: Damien Le Moal Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty Signed-off-by: Vincent Fu --- Documentation/block/null_blk.rst | 5 ++ drivers/block/null_blk/main.c | 97 ++- drivers/block/null_blk

[PATCH v17 11/12] null: Enable trace capability for null block

2023-10-19 Thread Nitesh Shetty
This is a prep patch to enable copy trace capability. At present only zoned null_block is using trace, so we decoupled trace and zoned dependency to make it usable in null_blk driver also. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- drivers/block

[PATCH v17 10/12] dm: Enable copy offload for dm-linear target

2023-10-19 Thread Nitesh Shetty
Setting copy_offload_supported flag to enable offload. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty --- drivers/md/dm-linear.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index f4448d520ee9..1d1ee30bbefb 100644 --- a/drivers

[PATCH v17 09/12] dm: Add support for copy offload

2023-10-19 Thread Nitesh Shetty
Before enabling copy for dm target, check if underlying devices and dm target support copy. Avoid split happening inside dm target. Fail early if the request needs split, currently splitting copy request is not supported. Signed-off-by: Nitesh Shetty --- drivers/md/dm-table.c | 37

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

2023-10-19 Thread Nitesh Shetty
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. Reviewed-by: Hannes Reinecke Signed-off-by: Nitesh Shetty

[PATCH v17 07/12] nvme: add copy offload support

2023-10-19 Thread Nitesh Shetty
Reinecke Signed-off-by: Kanchan Joshi Signed-off-by: Nitesh Shetty Signed-off-by: Javier González Signed-off-by: Anuj Gupta --- drivers/nvme/host/constants.c | 1 + drivers/nvme/host/core.c | 79 +++ drivers/nvme/host/trace.c | 19 + include/linux

[PATCH v17 01/12] block: Introduce queue limits and sysfs for copy-offload support

2023-10-19 Thread Nitesh Shetty
-by: Hannes Reinecke Reviewed-by: Luis Chamberlain Signed-off-by: Nitesh Shetty Signed-off-by: Kanchan Joshi Signed-off-by: Anuj Gupta --- Documentation/ABI/stable/sysfs-block | 23 ++ block/blk-settings.c | 24 +++ block/blk-sysfs.c

[PATCH v17 02/12] Add infrastructure for copy offload in block and request layer.

2023-10-19 Thread Nitesh Shetty
merge function. Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- block/blk-core.c | 7 +++ block/blk-merge.c | 41 +++ block/blk.h | 16 +++ block/elevator.h | 1 + include/linux/bio.h

[PATCH v17 04/12] block: add emulation for copy

2023-10-19 Thread Nitesh Shetty
nding destination. At present in kernel user of emulation is fabrics. Signed-off-by: Nitesh Shetty Signed-off-by: Vincent Fu Signed-off-by: Anuj Gupta --- block/blk-lib.c| 223 + include/linux/blkdev.h | 4 + 2 files changed, 227 insertions(+)

[PATCH v17 03/12] block: add copy offload support

2023-10-19 Thread Nitesh Shetty
reason, if a request comes to the driver with only one of src/dst bio, we fail the copy offload. Larger copy will be divided, based on max_copy_sectors limit. Reviewed-by: Hannes Reinecke Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty --- block/blk-lib.c| 204

[PATCH v17 00/12] Implement copy offload support

2023-10-19 Thread Nitesh Shetty
20230920080756.11919-1-nj.she...@samsung.com/T/#t [2] https://qemu-project.gitlab.io/qemu/system/devices/nvme.html#simple-copy [3] https://github.com/nitesh-shetty/blktests/tree/feat/copy_offload/v15 [4] https://github.com/OpenMPDK/fio/tree/copyoffload-3.35-v1