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

2023-01-12 Thread Hannes Reinecke
On 1/12/23 12:58, Nitesh Shetty wrote: For the devices which does not support copy, copy emulation is added. Copy-emulation is implemented by reading from source ranges into memory and writing to the corresponding destination asynchronously. For zoned device we maintain a linked list of read subm

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

2023-01-12 Thread Hannes Reinecke
On 1/12/23 15:46, Hannes Reinecke wrote: On 1/12/23 12:58, Nitesh Shetty wrote: For the devices which does not support copy, copy emulation is added. Copy-emulation is implemented by reading from source ranges into memory and writing to the corresponding destination asynchronously. For zoned dev

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

2023-01-12 Thread Nitesh Shetty
For the devices which does not support copy, copy emulation is added. Copy-emulation is implemented by reading from source ranges into memory and writing to the corresponding destination asynchronously. For zoned device we maintain a linked list of read submission and try to submit corresponding wr

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

2023-01-12 Thread Nitesh Shetty
Add support for handling target 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 shows cop

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

2023-01-12 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 v6 9/9] dm kcopyd: use copy offload support

2023-01-12 Thread Nitesh Shetty
Introduce copy_jobs to use copy-offload, if supported by underlying devices otherwise fall back to existing method. run_copy_jobs() calls block layer copy offload API, if both source and destination request queue are same and support copy offload. On successful completion, destination regions copi

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

2023-01-12 Thread Nitesh Shetty
The patch series covers the points discussed in November 2021 virtual call [LSF/MM/BFP TOPIC] Storage: Copy Offload [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 bde

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

2023-01-12 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

[dm-devel] [PATCH v6 4/9] block: Introduce a new ioctl for copy

2023-01-12 Thread Nitesh Shetty
Add new BLKCOPY ioctl that offloads copying of one or more sources ranges to one or more destination in a device. COPY ioctl accepts a 'copy_range' structure that contains no of range, a reserved field , followed by an array of ranges. Each source range is represented by 'range_entry' that contains

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

2023-01-12 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 | 42 ++

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

2023-01-12 Thread Nitesh Shetty
Introduce blkdev_issue_copy which supports source and destination bdevs, and an array of (source, destination and copy length) tuples. 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 to

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

2023-01-12 Thread Hannes Reinecke
On 1/12/23 12:58, Nitesh Shetty wrote: Introduce blkdev_issue_copy which supports source and destination bdevs, and an array of (source, destination and copy length) tuples. Introduce REQ_COPY copy offload operation flag. Create a read-write bio pair with a token as payload and submitted to the d

Re: [dm-devel] [PATCH v3] libmultipath: is_path_valid(): check if device is in use

2023-01-12 Thread Benjamin Marzinski
On Thu, Dec 22, 2022 at 03:27:21PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > To check whether we will be able to add a given device can be part > of a multipath map, we have two tests in check_path_valid(): > released_to_systemd() and the O_EXCL test. The former isn't helpful > if "m

[dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options

2023-01-12 Thread Benjamin Marzinski
From: Nitin Yewale The multipathd command "multipathd show wildcards" shows the pathgroup format wildcards, but there is no way to use them in a multipathd command. Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libmultipath

[dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page

2023-01-12 Thread Benjamin Marzinski
From: Nitin Yewale Move "multipathd show wildcards" command above the $format commands and also add $format options for "map" and "path" commands to the multipathd man page. Signed-off-by: Benjamin Marzinski --- multipathd/multipathd.8 | 16 1 file changed, 12 insertions(+), 4

[dm-devel] [PATCH 0/2] multipath format options cleanup

2023-01-12 Thread Benjamin Marzinski
These are two small cleanup patches for the multipathd format wildcards that I've been given. Nitin Yewale (2): multipathd: Add format options to multipathd man page libmultipath: remove pathgroup wildcard options libmultipath/print.c| 7 --- multipathd/multipathd.8 | 16 +++