Re: [dm-devel] [PATCH] libmultipath: check if adopt_path() really added current path

2021-02-03 Thread lixiaokeng
On 2021/2/3 21:14, Martin Wilck wrote: > On Wed, 2021-02-03 at 17:42 +0800, lixiaokeng wrote: >> >> >> On 2021/2/3 16:14, Martin Wilck wrote: >>> Is this also a Tested-by:? >>> IOW, did it fix your issue? >> >> Yes, it solves the crash.But there is an other issue. >> >> multipath.conf >> default

Re: [dm-devel] [PATCH v4 1/6] docs: device-mapper: add remap_and_filter

2021-02-03 Thread Randy Dunlap
On 2/3/21 7:53 AM, Sergei Shtepa wrote: > remap_and_filter - describes the new features that > blk_interposer provides for device mapper. > > Signed-off-by: Sergei Shtepa Hi-- Please see comments below. > --- > .../admin-guide/device-mapper/index.rst | 1 + > .../device-mapper/remap_a

Re: [dm-devel] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1df5/0x2650

2021-02-03 Thread Steven Rostedt
On Tue, 2 Feb 2021 19:09:44 -0800 Ivan Babrou wrote: > On Thu, Jan 28, 2021 at 7:35 PM Ivan Babrou wrote: > > > > Hello, > > > > We've noticed the following regression in Linux 5.10 branch: > > > > [ 128.367231][C0] > > == > >

Re: [dm-devel] [PATCH] multipathd: avoid crash in uevent_cleanup()

2021-02-03 Thread lixiaokeng
On 2021/2/3 21:57, Martin Wilck wrote: >> If exit() before all pthread_cancel in child of 0.7.7, there is no >> any crash. > What do you mean with "exit() before all pthread_cancel"? If this > happens on pthread_cancel(), and you don't call that function, this > would actually be expected. When

Re: [dm-devel] [PATCH 3/3] libmultipath: check return value of udev_device_get_devnum()

2021-02-03 Thread Benjamin Marzinski
On Tue, Feb 02, 2021 at 10:41:31PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > udev_device_get_devnum() may fail, in which case it returns > makedev(0, 0). > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 3 +++ > 1 file changed, 3

[dm-devel] [PATCH v4 6/6] docs: device-mapper: 'noexcl' option for dm-linear

2021-02-03 Thread Sergei Shtepa
New 'noexcl' option allow to open underlying block-device without FMODE_EXCL flag. Signed-off-by: Sergei Shtepa --- .../admin-guide/device-mapper/linear.rst | 26 --- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/device-mapper/linea

[dm-devel] [PATCH v4 5/6] dm: add 'noexcl' option for dm-linear

2021-02-03 Thread Sergei Shtepa
The 'noexcl' option allow to open underlying block-device without FMODE_EXCL. Signed-off-by: Sergei Shtepa --- drivers/md/dm-linear.c| 14 +- drivers/md/dm-table.c | 12 +++- drivers/md/dm.c | 24 +--- drivers/md/dm.h

[dm-devel] [PATCH v4 3/6] block: add blk_mq_is_queue_frozen()

2021-02-03 Thread Sergei Shtepa
blk_mq_is_queue_frozen() allow to assert that the queue is frozen. Signed-off-by: Sergei Shtepa --- block/blk-mq.c | 13 + include/linux/blk-mq.h | 1 + 2 files changed, 14 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index f285a9123a8b..924ec26fae5f 100644 --

[dm-devel] [PATCH v4 1/6] docs: device-mapper: add remap_and_filter

2021-02-03 Thread Sergei Shtepa
remap_and_filter - describes the new features that blk_interposer provides for device mapper. Signed-off-by: Sergei Shtepa --- .../admin-guide/device-mapper/index.rst | 1 + .../device-mapper/remap_and_filter.rst| 132 ++ 2 files changed, 133 insertions(+) create

[dm-devel] [PATCH v4 4/6] dm: new ioctl DM_DEV_REMAP_CMD

2021-02-03 Thread Sergei Shtepa
New ioctl DM_DEV_REMAP_CMD allow to remap bio requests from regular block device to dm device. Signed-off-by: Sergei Shtepa --- drivers/md/dm-core.h | 20 ++ drivers/md/dm-ioctl.c | 39 drivers/md/dm.c | 376 +- include/uapi/l

[dm-devel] [PATCH v4 2/6] block: add blk_interposer

2021-02-03 Thread Sergei Shtepa
blk_interposer allows to intercept bio requests, remap bio to another devices or add new bios. Signed-off-by: Sergei Shtepa --- block/bio.c | 2 + block/blk-core.c | 33 block/genhd.c | 82 +++ include/linu

[dm-devel] [PATCH v4 0/6] block-layer interposer

2021-02-03 Thread Sergei Shtepa
Hi all. I'm ready to suggest the block-layer interposer (blk_interposer). blk_interposer allows to intercept bio requests, remap bio to another devices or add new bios. This patch series adds support blk_interposer for dm-linear. In the first patch, I suggest the remap_and_filter.rst file. Yes,

Re: [dm-devel] [PATCH 2/3] multipathd: ev_add_path: fail if add_map_with_path() fails

2021-02-03 Thread Benjamin Marzinski
On Tue, Feb 02, 2021 at 10:41:30PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > If start_waiter was set before and the "rescan" label was used, > we may try to set up an empty/invalid map. > Always fail if add_map_with_path() isn't successful. > > Signed-off-by: Martin Wilck This pat

Re: [dm-devel] [PATCH] multipathd: avoid crash in uevent_cleanup()

2021-02-03 Thread Martin Wilck
On Wed, 2021-02-03 at 18:48 +0800, lixiaokeng wrote: > > > On 2021/2/3 4:52, Martin Wilck wrote: > > did this fix your "crash on exit" issue? > > Unfortunately, the issue is not solved. > > There will be some different coredump stack. > > 0.8.5 (I'm not sure there are only two stacks in 0.8.5)

Re: [dm-devel] [PATCH] libmultipath: check if adopt_path() really added current path

2021-02-03 Thread Martin Wilck
On Wed, 2021-02-03 at 17:42 +0800, lixiaokeng wrote: > > > On 2021/2/3 16:14, Martin Wilck wrote: > > Is this also a Tested-by:? > > IOW, did it fix your issue? > > Yes, it solves the crash.But there is an other issue. > > multipath.conf > defaults { >     find_multipaths no > } > > [root

Re: [dm-devel] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1df5/0x2650

2021-02-03 Thread Peter Zijlstra
On Tue, Feb 02, 2021 at 07:09:44PM -0800, Ivan Babrou wrote: > On Thu, Jan 28, 2021 at 7:35 PM Ivan Babrou wrote: > > == > > [ 128.368523][C0] BUG: KASAN: stack-out-of-bounds in > > unwind_next_frame (arch/x86/kernel/unwind_orc.

Re: [dm-devel] [PATCH 0/3] consistent behavior of filter_property()

2021-02-03 Thread Benjamin Marzinski
On Tue, Feb 02, 2021 at 10:27:26PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > This is a spring-off of the previous discussion under the subject > "libmultipath: fix NULL dereference in get_be64". > > Repeating part of the text of my last post there: > > pp->uid_attribute may be set

Re: [dm-devel] [PATCH v4 2/6] block: add blk_interposer

2021-02-03 Thread Mike Snitzer
On Wed, Feb 03 2021 at 10:53am -0500, Sergei Shtepa wrote: > blk_interposer allows to intercept bio requests, remap bio to another devices > or add new bios. > > Signed-off-by: Sergei Shtepa > --- > block/bio.c | 2 + > block/blk-core.c | 33 > block/g

Re: [dm-devel] [PATCH v4 4/6] dm: new ioctl DM_DEV_REMAP_CMD

2021-02-03 Thread Greg KH
On Wed, Feb 03, 2021 at 06:53:56PM +0300, Sergei Shtepa wrote: > --- a/include/uapi/linux/dm-ioctl.h > +++ b/include/uapi/linux/dm-ioctl.h > @@ -214,6 +214,15 @@ struct dm_target_msg { > char message[0]; > }; > > +enum { > + REMAP_START_CMD = 1, > + REMAP_FINISH_CMD, Don't you nee

Re: [dm-devel] [PATCH v4 3/6] block: add blk_mq_is_queue_frozen()

2021-02-03 Thread Mike Snitzer
On Wed, Feb 03 2021 at 10:53am -0500, Sergei Shtepa wrote: > blk_mq_is_queue_frozen() allow to assert that the queue is frozen. > > Signed-off-by: Sergei Shtepa > --- > block/blk-mq.c | 13 + > include/linux/blk-mq.h | 1 + > 2 files changed, 14 insertions(+) > > diff --g

Re: [dm-devel] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1df5/0x2650

2021-02-03 Thread Ivan Babrou
On Thu, Jan 28, 2021 at 7:35 PM Ivan Babrou wrote: > > Hello, > > We've noticed the following regression in Linux 5.10 branch: > > [ 128.367231][C0] > == > [ 128.368523][C0] BUG: KASAN: stack-out-of-bounds in > unwind_next_f

Re: [dm-devel] [PATCH] libmultipath: check if adopt_path() really added current path

2021-02-03 Thread Martin Wilck
On Wed, 2021-02-03 at 09:33 +0800, lixiaokeng wrote: > > > On 2021/2/3 3:57, mwi...@suse.com wrote: > > From: Martin Wilck > > > > The description of 2d32d6f ("libmultipath: adopt_paths(): don't > > bail out on > > single path failure") said "we need to check after successful call > > to > > ad

Re: [dm-devel] [PATCH] multipathd: avoid crash in uevent_cleanup()

2021-02-03 Thread lixiaokeng
On 2021/2/3 4:52, Martin Wilck wrote: > did this fix your "crash on exit" issue? Unfortunately, the issue is not solved. There are 100 luns and two scripts to reproduce the issue. #!/bin/bash while true do for i in `seq 1 20` do udevadm trigger done

Re: [dm-devel] [PATCH RESEND v2 08/10] md: Implement ->corrupted_range()

2021-02-03 Thread Ruan Shiyang
On 2021/2/2 上午11:17, Darrick J. Wong wrote: On Fri, Jan 29, 2021 at 02:27:55PM +0800, Shiyang Ruan wrote: With the support of ->rmap(), it is possible to obtain the superblock on a mapped device. If a pmem device is used as one target of mapped device, we cannot obtain its superblock directly

Re: [dm-devel] [PATCH RESEND v2 09/10] xfs: Implement ->corrupted_range() for XFS

2021-02-03 Thread Ruan Shiyang
On 2021/2/2 上午10:41, Darrick J. Wong wrote: On Fri, Jan 29, 2021 at 02:27:56PM +0800, Shiyang Ruan wrote: This function is used to handle errors which may cause data lost in filesystem. Such as memory failure in fsdax mode. In XFS, it requires "rmapbt" feature in order to query for files or

Re: [dm-devel] [PATCH 1/2] dm crypt: replaced #if defined with IS_ENABLED

2021-02-03 Thread Dmitry Baryshkov
пт, 22 янв. 2021 г. в 11:43, Ahmad Fatoum : > > IS_ENABLED(CONFIG_ENCRYPTED_KEYS) is true whether the option is built-in > or a module, so use it instead of #if defined checking for each > separately. > > The other #if was to avoid a static function defined, but unused > warning. As we now always b

Re: [dm-devel] [PATCH 1/2] dm crypt: replaced #if defined with IS_ENABLED

2021-02-03 Thread Ahmad Fatoum
Hello Mike, On 02.02.21 19:10, Mike Snitzer wrote: > On Fri, Jan 22 2021 at 3:43am -0500, > Ahmad Fatoum wrote: > >> IS_ENABLED(CONFIG_ENCRYPTED_KEYS) is true whether the option is built-in >> or a module, so use it instead of #if defined checking for each >> separately. >> >> The other #if was

Re: [dm-devel] [PATCH 2/2] dm crypt: support using trusted keys

2021-02-03 Thread Ahmad Fatoum
On 22.01.21 20:04, Ahmad Fatoum wrote: > On 22.01.21 19:18, Jarkko Sakkinen wrote: >> On Fri, Jan 22, 2021 at 08:05:51PM +0200, Jarkko Sakkinen wrote: >>> On Fri, Jan 22, 2021 at 09:43:21AM +0100, Ahmad Fatoum wrote: Commit 27f5411a718c ("dm crypt: support using encrypted keys") extended

Re: [dm-devel] [PATCH] libmultipath: check if adopt_path() really added current path

2021-02-03 Thread lixiaokeng
On 2021/2/3 16:14, Martin Wilck wrote: > Is this also a Tested-by:? > IOW, did it fix your issue? Yes, it solves the crash.But there is an other issue. multipath.conf defaults { find_multipaths no } [root@localhost coredump]# multipathd add path sdb fail [root@localhost coredump]# mu