[dm-devel] [PATCH] dm: call dm_zone_endio after the target endio callback for zoned devices

2023-02-20 Thread Pankaj Raghav
dm_zone_endio() updates the bi_sector of orig bio for zoned devices that uses either native append or append emulation, and it is called before the endio of the target. But target endio can still update the clone bio after dm_zone_endio is called, thereby, the orig bio does not contain the updated

Re: [dm-devel] [PATCH v7 4/8] fs, block: copy_file_range for def_blk_ops for direct block device.

2023-02-20 Thread kernel test robot
Hi Nitesh, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on device-mapper-dm/for-next] [also build test WARNING on linus/master v6.2 next-20230220] [cannot apply to axboe-block/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And

[dm-devel] [git pull] device mapper changes for 6.3

2023-02-20 Thread Mike Snitzer
Hi Linus, The following changes since commit 4a6a7bc21d4726c5772e47525e6039852555b391: block: Default to use cgroup support for BFQ (2023-01-30 09:42:42 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-6.3/dm-c

Re: [dm-devel] [PATCH v7 4/8] fs, block: copy_file_range for def_blk_ops for direct block device.

2023-02-20 Thread kernel test robot
Hi Nitesh, Thank you for the patch! Yet something to improve: [auto build test ERROR on device-mapper-dm/for-next] [also build test ERROR on linus/master v6.2 next-20230220] [cannot apply to axboe-block/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [dm-devel] [git pull] device mapper changes for 6.3

2023-02-20 Thread Mike Snitzer
On Mon, Feb 20 2023 at 12:31P -0500, Mike Snitzer wrote: > Hi Linus, > > The following changes since commit 4a6a7bc21d4726c5772e47525e6039852555b391: > > block: Default to use cgroup support for BFQ (2023-01-30 09:42:42 -0700) > > are available in the Git repository at: > > git://git.kern

Re: [dm-devel] [PATCH v7 4/8] fs, block: copy_file_range for def_blk_ops for direct block device.

2023-02-20 Thread kernel test robot
Hi Nitesh, Thank you for the patch! Yet something to improve: [auto build test ERROR on device-mapper-dm/for-next] [also build test ERROR on linus/master v6.2 next-20230220] [cannot apply to axboe-block/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

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

2023-02-20 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 3212ef6aa81b..b4b57bead495 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md

[dm-devel] [PATCH v7 0/8] Implement copy offload support

2023-02-20 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 v7 3/8] block: add emulation for copy

2023-02-20 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 v7 7/8] dm: Add support for copy offload.

2023-02-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 | 42 ++

[dm-devel] [PATCH v7 5/8] nvme: add copy offload support

2023-02-20 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 v7 1/8] block: Introduce queue limits for copy-offload support

2023-02-20 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 v7 6/8] nvmet: add copy command support for bdev and file ns

2023-02-20 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 v7 4/8] fs, block: copy_file_range for def_blk_ops for direct block device.

2023-02-20 Thread Nitesh Shetty
For direct block device, 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-off-by: Nitesh Shetty

[dm-devel] [PATCH v7 2/8] block: Add copy offload support infrastructure

2023-02-20 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