Re: [dm-devel] [PATCH] 11-dm-mpath.rules: fix warnings reported by udevadm verify

2023-05-22 Thread Martin Wilck
On Sat, 2023-05-20 at 01:33 +0300, Dmitry V. Levin wrote: > Fix the following warnings reported by udevadm verify: > > multipath/11-dm-mpath.rules:18 Whitespace after comma is expected. > multipath/11-dm-mpath.rules:73 Whitespace after comma is expected. > multipath/11-dm-mpath.rules:73 Whitespace

Re: [dm-devel] [PATCH] 11-dm-mpath.rules: fix warnings reported by udevadm verify

2023-05-22 Thread Martin Wilck
On Mon, 2023-05-22 at 13:49 +0300, Dmitry V. Levin wrote: > On Mon, May 22, 2023 at 12:19:04PM +0200, Martin Wilck wrote: > > On Sat, 2023-05-20 at 01:33 +0300, Dmitry V. Levin wrote: > > > Fix the following warnings reported by udevadm verify: > > > > > > multipath/11-dm-mpath.rules:18 Whitespace

[dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-22 Thread Nitesh Shetty
Introduce blkdev_issue_copy which takes similar arguments as copy_file_range and performs copy offload between two bdevs. Introduce REQ_COPY copy offload operation flag. Create a read-write bio pair with a token as payload and submitted to the device in order. Read request populates token with sour

[dm-devel] [PATCH v11 8/9] dm: Enable copy offload for dm-linear target

2023-05-22 Thread Nitesh Shetty
Setting copy_offload_supported flag to enable offload. 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/md/dm-linear.c +++ b/drivers/md

[dm-devel] [PATCH v11 3/9] block: add emulation for copy

2023-05-22 Thread Nitesh Shetty
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. Copy-emulation is implemented by reading from source into memory and writing to the corresponding d

[dm-devel] [PATCH v11 0/9] Implement copy offload support

2023-05-22 Thread Nitesh Shetty
The patch series covers the points discussed in past and most recently in LSFMM'23[0]. We have covered the initial agreed requirements in this patchset and further additional features suggested by community. Patchset borrows Mikulas's token based approach for 2 bdev implementation. This is next it

Re: [dm-devel] [PATCH] 11-dm-mpath.rules: fix warnings reported by udevadm verify

2023-05-22 Thread Dmitry V. Levin
On Mon, May 22, 2023 at 12:19:04PM +0200, Martin Wilck wrote: > On Sat, 2023-05-20 at 01:33 +0300, Dmitry V. Levin wrote: > > Fix the following warnings reported by udevadm verify: > > > > multipath/11-dm-mpath.rules:18 Whitespace after comma is expected. > > multipath/11-dm-mpath.rules:73 Whitesp

[dm-devel] [PATCH v11 5/9] nvme: add copy offload support

2023-05-22 Thread Nitesh Shetty
For device supporting native copy, nvme driver receives read and write request with BLK_COPY op flags. For read request the nvme driver populates the payload with source information. For write request the driver converts it to nvme copy command using the source information in the payload and submit

[dm-devel] [PATCH v11 4/9] fs, block: copy_file_range for def_blk_ops for direct block device

2023-05-22 Thread Nitesh Shetty
For direct block device opened with O_DIRECT, use copy_file_range to issue device copy offload, and fallback to generic_copy_file_range incase device copy offload capability is absent. Modify checks to allow bdevs to use copy_file_range. Suggested-by: Ming Lei Signed-off-by: Anuj Gupta Signed-of

[dm-devel] [PATCH v11 7/9] dm: Add support for copy offload

2023-05-22 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 | 41 ++

[dm-devel] [PATCH v11 1/9] block: Introduce queue limits for copy-offload support

2023-05-22 Thread Nitesh Shetty
Add device limits as sysfs entries, - copy_offload (RW) - copy_max_bytes (RW) - copy_max_bytes_hw (RO) Above limits help to split the copy payload in block layer. copy_offload: used for setting copy offload(1) or emulation(0). copy_max_bytes: maximum total length of copy in

Re: [dm-devel] [PATCH v11 1/9] block: Introduce queue limits for copy-offload support

2023-05-22 Thread Damien Le Moal
On 5/22/23 19:41, Nitesh Shetty wrote: > Add device limits as sysfs entries, > - copy_offload (RW) > - copy_max_bytes (RW) > - copy_max_bytes_hw (RO) > > Above limits help to split the copy payload in block layer. > copy_offload: used for setting copy offload(1) or emulatio

[dm-devel] [PATCH v11 9/9] null_blk: add support for copy offload

2023-05-22 Thread Nitesh Shetty
Implementaion is based on existing read and write infrastructure. copy_max_bytes: A new configfs and module parameter is introduced, which can be used to set hardware/driver supported maximum copy limit. Suggested-by: Damien Le Moal Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty Signed-

[dm-devel] [PATCH v11 6/9] nvmet: add copy command support for bdev and file ns

2023-05-22 Thread Nitesh Shetty
Add support for handling nvme_cmd_copy command on target. For bdev-ns we call into blkdev_issue_copy, which the block layer completes by a offloaded copy request to backend bdev or by emulating the request. For file-ns we call vfs_copy_file_range to service our request. Currently target always sh

Re: [dm-devel] [PATCH v7 5/5] loop: Add support for provision requests

2023-05-22 Thread Darrick J. Wong
On Thu, May 18, 2023 at 03:33:26PM -0700, Sarthak Kukreti wrote: > Add support for provision requests to loopback devices. > Loop devices will configure provision support based on > whether the underlying block device/file can support > the provision request and upon receiving a provision bio, > wi

Re: [dm-devel] [PATCH v7 0/5] Introduce provisioning primitives

2023-05-22 Thread Mike Snitzer
On Fri, May 19 2023 at 7:07P -0400, Dave Chinner wrote: > On Fri, May 19, 2023 at 10:41:31AM -0400, Mike Snitzer wrote: > > On Fri, May 19 2023 at 12:09P -0400, > > Christoph Hellwig wrote: > > > > > FYI, I really don't think this primitive is a good idea. In the > > > concept of non-overwrit

[dm-devel] [PATCH v3 6/7] dm: Inline __dm_mq_kick_requeue_list()

2023-05-22 Thread Bart Van Assche
Since commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues") the function __dm_mq_kick_requeue_list() is too short to keep it as a separate function. Hence, inline this function. Cc: Christoph Hellwig Cc: Damien Le Moal Cc: Ming Lei Cc: Mike Snitzer Signed-off-by: Bart Van

[dm-devel] [PATCH v3 7/7] block: Inline blk_mq_{, delay_}kick_requeue_list()

2023-05-22 Thread Bart Van Assche
Patch "block: Preserve the order of requeued requests" changed blk_mq_kick_requeue_list() and blk_mq_delay_kick_requeue_list() into blk_mq_run_hw_queues() and blk_mq_delay_run_hw_queues() calls respectively. Inline blk_mq_{,delay_}kick_requeue_list() because these functions are now too short to kee

[dm-devel] [PATCH v7 5/5] loop: Add support for provision requests

2023-05-22 Thread Sarthak Kukreti
On Mon, May 22, 2023 at 9:37 AM Darrick J. Wong wrote: > > If someone calls fallocate(UNSHARE_RANGE) on a loop bdev, shouldn't > there be a way to pass that through to the fallocate call to the backing > file? > > --D > Yeah, I think we could add a REQ_UNSHARE bit (similar to REQ_NOUNMAP) to pass

Re: [dm-devel] [PATCH v7 5/5] loop: Add support for provision requests

2023-05-22 Thread Darrick J. Wong
On Mon, May 22, 2023 at 03:09:55PM -0700, Sarthak Kukreti wrote: > On Mon, May 22, 2023 at 9:37 AM Darrick J. Wong wrote: > > > > If someone calls fallocate(UNSHARE_RANGE) on a loop bdev, shouldn't > > there be a way to pass that through to the fallocate call to the backing > > file? > > > > --D >

Re: [dm-devel] [PATCH] 11-dm-mpath.rules: fix warnings reported by udevadm verify

2023-05-22 Thread Dmitry V. Levin
On Mon, May 22, 2023 at 06:11:14PM +0200, Martin Wilck wrote: [...] > I see. I'll apply this patch then (and the other one with the missing > comma, too), but unless you object, I'll add a note to the > commit message explaining that this for improving readability > and coding style compliance. I