On Wed, Sep 06, 2023 at 05:33:32PM +0200, Christian Brauner wrote:
> > Currently, if we freeze a filesystem with "fsfreeze" and unmount it, the
> > mount point is removed, but the filesystem stays active and it is leaked.
> > You can't unfreeze it with "fsfreeze --unfreeze" because the mount poin
On Wed, Sep 06, 2023 at 03:26:21PM +0200, Mikulas Patocka wrote:
> lvm may suspend any logical volume anytime. If lvm suspend races with
> unmount, it may be possible that the kernel writes to the filesystem after
> unmount successfully returned. The problem can be demonstrated with this
> script:
> Currently, if we freeze a filesystem with "fsfreeze" and unmount it, the
> mount point is removed, but the filesystem stays active and it is leaked.
> You can't unfreeze it with "fsfreeze --unfreeze" because the mount point
> is gone. (the only way how to recover it is "echo j>/proc/sysrq-trig
on unmount, to make sure that the filesystem is
> > + * really unmounted when this function returns.
> > + */
> > +void wait_and_deactivate_super(struct super_block *s)
> > +{
> > + down_write(&s->s_umount);
> > + while (s->s_writers.frozen !=
On Wed, Sep 06, 2023 at 06:01:06PM +0200, Mikulas Patocka wrote:
>
>
> On Wed, 6 Sep 2023, Christian Brauner wrote:
>
> > > > IOW, you'd also hang on any umount of a bind-mount. IOW, every
> > > > single container making use of this filesystems via bind-mounts would
> > > > hang on umount and sh
On 9/6/23 18:38, Nitesh Shetty wrote:
Introduce blkdev_copy_offload to perform copy offload.
Issue REQ_OP_COPY_SRC with source info along with taking a plug.
This flows till request layer and waits for dst bio to arrive.
Issue REQ_OP_COPY_DST with destination info and this bio reaches request
lay
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.
We expect caller to take a plug and send bi
Hi Nitesh,
kernel test robot noticed the following build warnings:
[auto build test WARNING on c50216cfa084d5eb67dc10e646a3283da1595bb6]
url:
https://github.com/intel-lab-lkp/linux/commits/Nitesh-Shetty/block-Introduce-queue-limits-and-sysfs-for-copy-offload-support/20230907-015817
base: c
On Fri, Sep 01, 2023 at 08:02:34PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> dm_get_uuid() will return 1 for non-existing maps. Thus we don't need
> to call dm_map_present() any more in alias_already_taken(). This changes
> our semantics: previously we'd avoid using an alias for whic
On Fri, Sep 01, 2023 at 08:02:33PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> libdevmapper will most probably not return a UUID for non-existing
> maps anyway. But it's cheap to double-check here.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmultipath
On Fri, Sep 01, 2023 at 08:02:32PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> The different implementation of get_user_friendly_alias() and its helpers
> necessitates changes in the unit tests. It would be nice if it didn't, but the
> unit tests are too closely bound to the implementa
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
> if additions have been made. This simplifies the code, and should speed up
On Fri, Sep 01, 2023 at 08:02:30PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> This way we can test the parsing of input lines from the bindings
> file more easily.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmultipath/alias.c | 58 +++
On Fri, Sep 01, 2023 at 08:02:29PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> The name of the temp file is unlikely to be helpful for uses,
> and hard to predict in the unit test. Omit it.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmultipath/alias.c
On Fri, Sep 01, 2023 at 08:02:28PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Save code and syscalls by assembling the content in memory first.
> write() may return less bytes written than expected. Deal with it.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
On Fri, Sep 01, 2023 at 08:02:27PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> This function just uses the file name, no other configuration
> parameters. Also, pass the Bindings argument first to use the
> same convention as the other functions in this file.
>
Reviewed-by: Benjamin M
On Fri, Sep 01, 2023 at 08:02:26PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> No code changes, just moving code.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmultipath/alias.c | 239 ++-
> 1 file changed, 120 in
On Fri, Sep 01, 2023 at 08:02:25PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> We will use this function in a more generic way, give it a more
> generic name.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmultipath/alias.c | 6 +++---
> 1 file changed,
On Fri, Sep 01, 2023 at 08:02:24PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Add a variable global_bindings that holds the currently active vector of
> bindings. This variable is freed at program exit.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmul
On Fri, Sep 01, 2023 at 08:02:22PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> This way we can further improve readability of the individual test
> cases.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> tests/alias.c | 98 +---
On Fri, Sep 01, 2023 at 08:02:23PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Further improve test readablity.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> tests/alias.c | 186 ++
> 1 file changed, 80 inser
On Fri, Sep 01, 2023 at 08:02:21PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Used the macros introduced with the tests for get_user_friendly_alias()
> also in the previously existing tests.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> tests/alias.c | 80
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, 531 insertions(+)
>
> diff --git a/tests/alias.c b/tests/alias.c
> index 11f20
On Fri, Sep 01, 2023 at 08:02:19PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> If there's a mismatch between expected and actual log message,
> print both messages.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> tests/test-log.c | 4 +++-
> 1 file changed,
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
> ---
> libmultipath/alias.c | 35 +++
> 1 file ch
On Fri, Sep 01, 2023 at 08:02:15PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Factor out a trivial helper function.
>
> Signed-off-by: Martin Wilck
> Cc: David Bond
> ---
> libmultipath/alias.c | 34 --
> 1 file changed, 20 insertions(+), 14 deletio
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 not try
> to re-use an alias that is already used by another map. Creating
On Fri, Sep 01, 2023 at 08:02:16PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> These functions are only called from select_alias(). The logic
> is more obvious when unified in a single function.
>
> Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
> Cc: David Bond
> ---
On Fri, Sep 01, 2023 at 08:02:14PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> "multipath -d" might change sysfs timeouts of SCSI devices.
> Make sure it doesn't.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> Cc: Jehan Singh
> ---
> libmultipath/configure.c | 4
Hi Nitesh,
kernel test robot noticed the following build warnings:
[auto build test WARNING on c50216cfa084d5eb67dc10e646a3283da1595bb6]
url:
https://github.com/intel-lab-lkp/linux/commits/Nitesh-Shetty/block-Introduce-queue-limits-and-sysfs-for-copy-offload-support/20230907-015817
base: c
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
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
---
drivers/block/null_blk/Makefile | 2 --
drivers
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 offload.
Added tracefs support to copy IO
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 ++
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 queue limits.
Signed-off-by: Kanchan Jos
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 fallback to copy emulation (blkdev_copy_emulati
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
Signed-off-by: Nitesh Shetty
---
bloc
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 to use ->f_mapping->host for both inode_i
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
Introduce blkdev_copy_offload to perform copy offload.
Issue REQ_OP_COPY_SRC with source info along with taking a plug.
This flows till request layer and waits for dst bio to arrive.
Issue REQ_OP_COPY_DST with destination info and this bio reaches request
layer and merges with src request.
For any
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.
We expect caller to take a plug and send bio with source information,
followed by b
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.
copy_max_hw_bytes: Reflects the device supported maximum limit.
Reviewed-b
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 patch set and
further additional features suggested by community.
This is next iteration of our previous patch set v14[1].
Copy offload is performed using
On Wed, Sep 06, 2023 at 06:01:06PM +0200, Mikulas Patocka wrote:
> Perhaps we could distinguish between FIFREEZE-initiated freezes and
> device-mapper initiated freezes as well. And we could change the logic to
> return -EBUSY if the freeze was initiated by FIFREEZE and to wait for
> unfreeze i
On Wed, Sep 06, 2023 at 05:03:34PM +0200, Mikulas Patocka wrote:
> > IOW, you'd also hang on any umount of a bind-mount. IOW, every
> > single container making use of this filesystems via bind-mounts would
> > hang on umount and shutdown.
>
> bind-mount doesn't modify "s->s_writers.frozen", so th
On Wed, 6 Sep 2023, Christian Brauner wrote:
> On Wed, Sep 06, 2023 at 06:01:06PM +0200, Mikulas Patocka wrote:
> >
> >
> > On Wed, 6 Sep 2023, Christian Brauner wrote:
> >
> > > > > IOW, you'd also hang on any umount of a bind-mount. IOW, every
> > > > > single container making use of this
On Wed, 6 Sep 2023, Christian Brauner wrote:
> > > IOW, you'd also hang on any umount of a bind-mount. IOW, every
> > > single container making use of this filesystems via bind-mounts would
> > > hang on umount and shutdown.
> >
> > bind-mount doesn't modify "s->s_writers.frozen", so the patch
On Wed, Sep 06, 2023 at 03:26:21PM +0200, Mikulas Patocka wrote:
> lvm may suspend any logical volume anytime. If lvm suspend races with
> unmount, it may be possible that the kernel writes to the filesystem after
> unmount successfully returned. The problem can be demonstrated with this
> script:
On Wed, 6 Sep 2023, Christian Brauner wrote:
> > What happens:
> > * dmsetup suspend calls freeze_bdev, that goes to freeze_super and it
> > increments sb->s_active
> > * then we unmount the filesystem, we go to cleanup_mnt, cleanup_mnt calls
> > deactivate_super, deactivate_super sees that
lvm may suspend any logical volume anytime. If lvm suspend races with
unmount, it may be possible that the kernel writes to the filesystem after
unmount successfully returned. The problem can be demonstrated with this
script:
#!/bin/sh -ex
modprobe brd rd_size=4194304
vgcreate vg /dev/ram0
lvcreat
50 matches
Mail list logo