[dm-devel] [PATCH] multipath-tools tests: fix stringop-overflow build errors with gcc 11

2021-02-10 Thread mwilck
From: Martin Wilck gcc-11 throws an error compiling alias.c and dmevents.c: In file included from ../libmultipath/checkers.h:4, from ../libmultipath/prio.h:7, from ../libmultipath/structs.h:8, from dmevents.c:29: ../multipathd/dmevents.c: In

Re: [dm-devel] [PATCH] multipath-tools tests: fix stringop-overflow build errors with gcc 11

2021-02-10 Thread Benjamin Marzinski
On Wed, Feb 10, 2021 at 01:24:57PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > gcc-11 throws an error compiling alias.c and dmevents.c: > > In file included from ../libmultipath/checkers.h:4, > from ../libmultipath/prio.h:7, > from

[dm-devel] [PATCH] dm: fix deadlock when swapping to encrypted device

2021-02-10 Thread Mikulas Patocka
Hi Here I'm sending the patch that fixes swapping to dm-crypt. The logic that limits the number of in-progress I/Os was moved to generic device mapper. A dm target can activate it by setting ti->limit_swap. The actual limit can be set in /sys/module/dm_mod/parameters/swap_ios. This patch only

Re: [dm-devel] [PATCH v3 02/11] blk: Introduce ->corrupted_range() for block device

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:21PM +0800, Shiyang Ruan wrote: > In fsdax mode, the memory failure happens on block device. So, it is > needed to introduce an interface for block devices. Each kind of block > device can handle the memory failure in ther own ways. As told before: DAX operations

Re: [dm-devel] [PATCH v3 06/11] mm, pmem: Implement ->memory_failure() in pmem driver

2021-02-10 Thread Christoph Hellwig
> +static int pmem_pagemap_memory_failure(struct dev_pagemap *pgmap, > + unsigned long pfn, int flags) > +{ > + struct pmem_device *pdev; > + struct gendisk *disk; > + loff_t disk_offset; > + int rc = 0; > + unsigned long size = page_size(pfn_to_page(pfn)); > + > +

Re: [dm-devel] [PATCH v3 10/11] xfs: Implement ->corrupted_range() for XFS

2021-02-10 Thread Christoph Hellwig
> + if (XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) || > + (rec->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK))) { > + // TODO check and try to fix metadata > + rc = -EFSCORRUPTED; > + xfs_force_shutdown(cur->bc_mp, SHUTDOWN_CORRUPT_META);

Re: [dm-devel] [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:20PM +0800, Shiyang Ruan wrote: > When memory-failure occurs, we call this function which is implemented > by each kind of devices. For the fsdax case, pmem device driver > implements it. Pmem device driver will find out the block device where > the error page

Re: [dm-devel] [PATCH v3 11/11] fs/dax: Remove useless functions

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:30PM +0800, Shiyang Ruan wrote: > Since owner tarcking is triggerred by pmem device, these functions are s/tarcking/tracking/ > useless. So remove them. Note that this patch does not apply for me when applying your two series on top of 5.11-rc5. -- dm-devel

Re: [dm-devel] [PATCH v3 05/11] mm, fsdax: Refactor memory-failure handler for dax mapping

2021-02-10 Thread Christoph Hellwig
> +extern int mf_dax_mapping_kill_procs(struct address_space *mapping, pgoff_t > index, int flags); No nee for the extern, please avoid the overly long line. > @@ -120,6 +121,13 @@ static int hwpoison_filter_dev(struct page *p) > if (PageSlab(p)) > return -EINVAL; > > +

Re: [dm-devel] [PATCH 0/4] dm era: Various minor fixes

2021-02-10 Thread Ming Hung Tsai
On Fri, Jan 22, 2021 at 11:30 PM Nikos Tsironis wrote: > > While working on fixing the bugs that cause lost writes, for which I > have sent separate emails, I bumped into several other minor issues that > I fix in this patch set. > > In particular, this series of commits introduces the following

Re: [dm-devel] [PATCH 4/4] dm era: Remove unreachable resize operation in pre-resume function

2021-02-10 Thread Mike Snitzer
On Fri, Jan 22 2021 at 10:25am -0500, Nikos Tsironis wrote: > The device metadata are resized in era_ctr(), so the metadata resize > operation in era_preresume() never runs. > > Also, note, that if the operation did ever run it would deadlock, since > the worker has not been started at this

Re: [dm-devel] [PATCH] multipath-tools tests: fix stringop-overflow build errors with gcc 11

2021-02-10 Thread Martin Wilck
On Wed, 2021-02-10 at 13:24 +0100, mwi...@suse.com wrote: > From: Martin Wilck > > gcc-11 throws an error compiling alias.c and dmevents.c: > > In file included from ../libmultipath/checkers.h:4, > from ../libmultipath/prio.h:7, > from

Re: [dm-devel] [PATCH] multipath-tools tests: fix stringop-overflow build errors with gcc 11

2021-02-10 Thread Martin Wilck
On Wed, 2021-02-10 at 15:18 +0100, Martin Wilck wrote: > > I'm told that this issue is related to this glibc bug: > https://sourceware.org/bugzilla/show_bug.cgi?id=26647 > > and should be fixed in glibc 2.33. Yet adding this patch doesn't hurt > us and can serve as a workaround for environments

Re: [dm-devel] [PATCH 0/4] dm era: Various minor fixes

2021-02-10 Thread Mike Snitzer
On Wed, Feb 10 2021 at 12:56pm -0500, Ming Hung Tsai wrote: > On Fri, Jan 22, 2021 at 11:30 PM Nikos Tsironis wrote: > > > > While working on fixing the bugs that cause lost writes, for which I > > have sent separate emails, I bumped into several other minor issues that > > I fix in this patch

Re: [dm-devel] [PATCH 4/4] dm era: Remove unreachable resize operation in pre-resume function

2021-02-10 Thread Mike Snitzer
On Wed, Feb 10 2021 at 1:12P -0500, Mike Snitzer wrote: > On Fri, Jan 22 2021 at 10:25am -0500, > Nikos Tsironis wrote: > > > The device metadata are resized in era_ctr(), so the metadata resize > > operation in era_preresume() never runs. > > > > Also, note, that if the operation did ever

Re: [dm-devel] [PATCH v4 4/5] dm: support key eviction from keyslot managers of underlying devices

2021-02-10 Thread Eric Biggers
On Mon, Feb 01, 2021 at 05:10:18AM +, Satya Tangirala wrote: > Now that device mapper supports inline encryption, add the ability to > evict keys from all underlying devices. When an upper layer requests > a key eviction, we simply iterate through all underlying devices > and evict that key

[dm-devel] [PATCH v2] dm: fix deadlock when swapping to encrypted device

2021-02-10 Thread Mikulas Patocka
The system would deadlock when swapping to a dm-crypt device. The reason is that for each incoming write bio, dm-crypt allocates memory that holds encrypted data. These excessive allocations exhaust all the memory and the result is either deadlock or OOM trigger. This patch limits the number of

Re: [dm-devel] [PATCH v4 2/5] block: keyslot-manager: Introduce functions for device mapper support

2021-02-10 Thread Eric Biggers
On Mon, Feb 01, 2021 at 05:10:16AM +, Satya Tangirala wrote: > Introduce blk_ksm_update_capabilities() to update the capabilities of > a keyslot manager (ksm) in-place. The pointer to a ksm in a device's > request queue may not be easily replaced, because upper layers like > the filesystem

Re: [dm-devel] [PATCH v4 3/5] dm: add support for passing through inline crypto support

2021-02-10 Thread Eric Biggers
On Mon, Feb 01, 2021 at 05:10:17AM +, Satya Tangirala wrote: > Update the device-mapper core to support exposing the inline crypto > support of the underlying device(s) through the device-mapper device. > > This works by creating a "passthrough keyslot manager" for the dm > device, which

Re: [dm-devel] dm: fix deadlock when swapping to encrypted device

2021-02-10 Thread Mike Snitzer
On Wed, Feb 10 2021 at 11:50am -0500, Mikulas Patocka wrote: > Hi > > Here I'm sending the patch that fixes swapping to dm-crypt. > > The logic that limits the number of in-progress I/Os was moved to generic > device mapper. A dm target can activate it by setting ti->limit_swap. The > actual

Re: [dm-devel] [PATCH v4 0/5] add support for inline encryption to device mapper

2021-02-10 Thread Jens Axboe
On 2/10/21 12:33 PM, Mike Snitzer wrote: > On Mon, Feb 01 2021 at 12:10am -0500, > Satya Tangirala wrote: > >> This patch series adds support for inline encryption to the device mapper. >> >> Patch 1 introduces the "passthrough" keyslot manager. >> >> The regular keyslot manager is designed for

Re: [dm-devel] [PATCH v4 0/5] add support for inline encryption to device mapper

2021-02-10 Thread Mike Snitzer
On Mon, Feb 01 2021 at 12:10am -0500, Satya Tangirala wrote: > This patch series adds support for inline encryption to the device mapper. > > Patch 1 introduces the "passthrough" keyslot manager. > > The regular keyslot manager is designed for inline encryption hardware that > have only a

Re: [dm-devel] [PATCH v4 5/5] dm: set DM_TARGET_PASSES_CRYPTO feature for some targets

2021-02-10 Thread Eric Biggers
On Mon, Feb 01, 2021 at 05:10:19AM +, Satya Tangirala wrote: > dm-linear and dm-flakey obviously can pass through inline crypto support. > > Co-developed-by: Eric Biggers > Signed-off-by: Eric Biggers > Signed-off-by: Satya Tangirala > --- > drivers/md/dm-flakey.c | 4 +++- >

Re: [dm-devel] [PATCH 2/2] multipathd: add recheck_wwid_time option to verify the path wwid

2021-02-10 Thread Martin Wilck
On Wed, 2021-02-10 at 19:09 +0100, Benjamin Block wrote: > > Yeah, just for reference, I saw this happening in practice when > something with the LU mapping changed on IBM storage - IIRC I saw it > with capacity changes. You end up in this code in the kernel: >     >

Re: [dm-devel] [PATCH 2/2] multipathd: add recheck_wwid_time option to verify the path wwid

2021-02-10 Thread Benjamin Marzinski
On Tue, Feb 09, 2021 at 10:19:45PM +, Martin Wilck wrote: > On Mon, 2021-02-08 at 23:19 -0600, Benjamin Marzinski wrote: > > There are cases where the wwid of a path changes due to LUN remapping > > without triggering uevent for the changed path. Multipathd has no > > method > > for trying to