Re: [dm-devel] [PATCH v15 12/12] null_blk: add support for copy offload

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, Nitesh Shetty wrote: Implementation 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. Only request based queue mode will support for copy of

Re: [dm-devel] [PATCH v15 11/12] null: Enable trace capability for null block

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, 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 also. Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta --- driver

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

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, Nitesh Shetty wrote: 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 ---

Re: [dm-devel] [PATCH v15 09/12] dm: Add support for copy offload

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, 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 supported. And here is where I would have expe

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

2023-09-07 Thread Hannes Reinecke
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 fallbac

Re: [dm-devel] [PATCH v15 07/12] nvme: add copy offload support

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, Nitesh Shetty wrote: Current design only supports single source range. We receive a request with REQ_OP_COPY_SRC. Parse this request which consists of src(1st) and dst(2nd) bios. Form a copy command (TP 4065) trace event support for nvme_copy_cmd. Set the device copy limits to q

Re: [dm-devel] [PATCH v15 06/12] fs, block: copy_file_range for def_blk_ops for direct block device

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, Nitesh Shetty wrote: 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 or the device files are not open with O_DIRECT. Signed-off-by: Anuj Gupta

Re: [dm-devel] [PATCH v15 05/12] fs/read_write: Enable copy_file_range for block device.

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, 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 interface for block copy offload. Change generic_copy_file_checks t

Re: [dm-devel] [PATCH v15 04/12] block: add emulation for copy

2023-09-07 Thread Hannes Reinecke
On 9/6/23 18:38, 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. Copy-emulation is implemented by reading from source into m

Re: [dm-devel] [PATCH v15 03/12] block: add copy offload support

2023-09-07 Thread Hannes Reinecke
On 9/7/23 09:16, Nitesh Shetty wrote: On 07/09/23 07:49AM, Hannes Reinecke wrote: On 9/6/23 18:38, Nitesh Shetty wrote: Hmm. That looks a bit odd. Why do you have to use wait_for_completion? wait_for_completion is waiting for all the copy IOs to complete, when caller does not pass endio handl

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-07 Thread Martin Wilck
On Thu, 2023-09-07 at 15:02 -0500, Benjamin Marzinski wrote: > On Thu, Sep 07, 2023 at 02:14:04PM -0500, Benjamin Marzinski wrote: > > On Thu, Sep 07, 2023 at 12:30:53PM +0200, Martin Wilck wrote: > > > On Wed, 2023-09-06 at 17:47 -0500, Benjamin Marzinski wrote: > > > > On Fri, Sep 01, 2023 at 08:

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-07 Thread Benjamin Marzinski
On Thu, Sep 07, 2023 at 02:14:04PM -0500, Benjamin Marzinski wrote: > On Thu, Sep 07, 2023 at 12:30:53PM +0200, Martin Wilck wrote: > > On Wed, 2023-09-06 at 17:47 -0500, Benjamin Marzinski wrote: > > > On Fri, Sep 01, 2023 at 08:02:31PM +0200, mwi...@suse.com wrote: > > > > From: Martin Wilck > >

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

2023-09-07 Thread Luis Chamberlain
On Wed, Sep 06, 2023 at 10:08:26PM +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 total length of copy in single payload. > co

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-07 Thread Benjamin Marzinski
On Thu, Sep 07, 2023 at 12:30:53PM +0200, Martin Wilck wrote: > On Wed, 2023-09-06 at 17:47 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 01, 2023 at 08:02:31PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > +   vector_foreach_slot(bindings, bdg, i) { > > > +  

Re: [dm-devel] [PATCH 04/21] libmultipath: never allocate an alias that's already taken

2023-09-07 Thread Martin Wilck
On Thu, 2023-09-07 at 15:33 +0200, Martin Wilck wrote: > On Thu, 2023-09-07 at 09:24 +0200, Martin Wilck wrote: > > On Wed, 2023-09-06 at 17:42 -0500, Benjamin Marzinski wrote: > > > On Fri, Sep 01, 2023 at 08:02:17PM +0200, mwi...@suse.com wrote: > > > > > > > > > Again, unless I'm overlooking s

Re: [dm-devel] [PATCH 04/21] libmultipath: never allocate an alias that's already taken

2023-09-07 Thread Martin Wilck
On Thu, 2023-09-07 at 09:24 +0200, Martin Wilck wrote: > On Wed, 2023-09-06 at 17:42 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 01, 2023 at 08:02:17PM +0200, mwi...@suse.com wrote: > > > > > > Again, unless I'm overlooking something, I don't think we need to > > check if the alias is alread

Re: [dm-devel] [PATCH] fix writing to the filesystem after unmount

2023-09-07 Thread Mikulas Patocka
On Thu, 7 Sep 2023, Christian Brauner wrote: > > I think we've got too deep down into "how to fix things" but I'm not 100% > > We did. > > > sure what the "bug" actually is. In the initial posting Mikulas writes "the > > kernel writes to the filesystem after unmount successfully returned" - i

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-07 Thread Martin Wilck
On Wed, 2023-09-06 at 17:47 -0500, Benjamin Marzinski wrote: > On Fri, Sep 01, 2023 at 08:02:31PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > Rather than opening the bindings file every time we must retrieve > > a binding, keep the contents in memory and write the file only > > i

Re: [dm-devel] [PATCH] fix writing to the filesystem after unmount

2023-09-07 Thread Jan Kara
On Wed 06-09-23 18:52:39, Mikulas Patocka wrote: > On Wed, 6 Sep 2023, Christian Brauner wrote: > > On Wed, Sep 06, 2023 at 06:01:06PM +0200, Mikulas Patocka wrote: > > > > > BTW. what do you think that unmount of a frozen filesystem should > > > > > properly > > > > > do? Fail with -EBUSY? Or, u

Re: [dm-devel] [PATCH 05/21] libmultipath: lookup_binding: add comment about the algorithm

2023-09-07 Thread Martin Wilck
On Wed, 2023-09-06 at 17:43 -0500, Benjamin Marzinski wrote: > On Fri, Sep 01, 2023 at 08:02:18PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > When I read this code, I always get confused. Adding comments to > > explain the algorithm. > > > > Signed-off-by: Martin Wilck > > ---

Re: [dm-devel] [PATCH v15 03/12] block: add copy offload support

2023-09-07 Thread Nitesh Shetty
On 07/09/23 07:49AM, Hannes Reinecke wrote: On 9/6/23 18:38, Nitesh Shetty wrote: Hmm. That looks a bit odd. Why do you have to use wait_for_completion? wait_for_completion is waiting for all the copy IOs to complete, when caller does not pass endio handler. Copy IO submissions are still async

Re: [dm-devel] [PATCH v15 02/12] Add infrastructure for copy offload in block and request layer.

2023-09-07 Thread Nitesh Shetty
On 07/09/23 07:39AM, Hannes Reinecke wrote: On 9/6/23 18:38, Nitesh Shetty wrote: We add two new opcode REQ_OP_COPY_SRC, REQ_OP_COPY_DST. 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 mapper

Re: [dm-devel] [PATCH 07/21] multipath-tools tests: add tests for get_user_friendly_alias()

2023-09-07 Thread Martin Wilck
On Wed, 2023-09-06 at 17:43 -0500, Benjamin Marzinski wrote: > On Fri, Sep 01, 2023 at 08:02:20PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > Signed-off-by: Martin Wilck > > --- > >  tests/alias.c | 531 > > ++ > >  1 file changed,

Re: [dm-devel] [PATCH 04/21] libmultipath: never allocate an alias that's already taken

2023-09-07 Thread Martin Wilck
On Wed, 2023-09-06 at 17:42 -0500, Benjamin Marzinski wrote: > On Fri, Sep 01, 2023 at 08:02:17PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > If the bindings file is changed in a way that multipathd can't > > handle > > (e.g. by swapping the aliases of two maps), multipathd must