Re: [dm-devel] [PATCH 04/14] libmultipath: uevent_dispatch(): process uevents one by one

2022-04-01 Thread Benjamin Marzinski
> On Thu, Mar 31, 2022 at 12:15:00AM +0200, mwi...@suse.com wrote: > The main rationale for delaying uevents is that the > uevent dispatcher may have to wait for other threads to release the > vecs lock, may the vecs lock for an extended amount of time, and > even sleep occasionally. By delaying

[dm-devel] [PATCH v2] multipath: return failure on an invalid remove command

2022-03-30 Thread Benjamin Marzinski
So before calling _dm_flush_map(), call dm_is_mpath(), to check if the device exists and is a multipath device, and return failure if it's not. Signed-off-by: Benjamin Marzinski --- changes since v1: - more meaningful error message. Suggested by mwilck multipath/main.c | 5 + 1 file

Re: [dm-devel] [PATCH] multipath: return failure on an invalid remove command

2022-03-30 Thread Benjamin Marzinski
On Wed, Mar 30, 2022 at 12:50:00PM +, Martin Wilck wrote: > On Tue, 2022-03-29 at 22:21 -0500, Benjamin Marzinski wrote: > > When "multipath -f" is run on a device that doesn't exist or isn't a > > multipath device, the command will not remove any device, but it will

Re: [dm-devel] [RFC PATCH] multipathd: Don't keep starting TUR threads, if they always hang.

2022-03-30 Thread Benjamin Marzinski
On Wed, Mar 30, 2022 at 09:44:39AM +, Martin Wilck wrote: > On Tue, 2022-03-29 at 22:22 -0500, Benjamin Marzinski wrote: > > If tur thead hangs, multipathd was simply creating a new thread, and > > assuming that the old thread would get cleaned up eventually. I have > >

[dm-devel] [RFC PATCH] multipathd: Don't keep starting TUR threads, if they always hang.

2022-03-29 Thread Benjamin Marzinski
thread. Once the thread completes, the count is reset. Signed-off-by: Benjamin Marzinski --- libmultipath/checkers/tur.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c index c93e4625..1bcb7576

[dm-devel] [PATCH] multipath: return failure on an invalid remove command

2022-03-29 Thread Benjamin Marzinski
So before calling _dm_flush_map(), call dm_is_mpath(), to check if the device exists and is a multipath device, and return failure if it's not. Signed-off-by: Benjamin Marzinski --- multipath/main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/multipath/main.c b/multipath/main.c inde

Re: [dm-devel] [PATCH v3 12/12] multipathd: decrease verbosity of handle_signal()

2022-03-29 Thread Benjamin Marzinski
gt; Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipathd/main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/multipathd/main.c b/multipathd/main.c > index aee0953..1406251 100644 > --- a/multipathd/main.c >

Re: [dm-devel] [PATCH v3 11/12] multipathd: make startup / shutdown messages less noisy

2022-03-29 Thread Benjamin Marzinski
On Thu, Mar 24, 2022 at 10:19:26PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > These messages are noisy in the system log without being actually helpful. > Print the version number on startup. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski &

Re: [dm-devel] [PATCH] multipath-tools: update mpp->force_readonly in ev_add_path

2022-03-24 Thread Benjamin Marzinski
On Thu, Mar 24, 2022 at 11:08:09AM -0600, Uday Shankar wrote: > Thanks to Benjamin for the review and to Martin for taking the patch. > > > https://github.com/openSUSE/multipath-tools/tree/queue > Benjamin, does RedHat take patches from this repo? The > device-mapper-multipath spec file seems to

Re: [dm-devel] [PATCH] multipath-tools: update mpp->force_readonly in ev_add_path

2022-03-23 Thread Benjamin Marzinski
; setting the mpp->force_readonly accordingly, and changing > dm_addmap_create to be aware of mpp->force_readonly. > > Signed-off-by: Uday Shankar Reviewed-by: Benjamin Marzinski > --- > libmultipath/devmapper.c | 2 +- > multipathd/main.c| 50 ++-

Re: [dm-devel] [PATCH v2 11/11] multipathd: remove unhelpful startup / shutdown messages

2022-03-22 Thread Benjamin Marzinski
On Tue, Mar 22, 2022 at 4:30 AM Martin Wilck wrote: > > On Mon, 2022-03-21 at 19:43 -0500, Benjamin Marzinski wrote: > > On Fri, Mar 18, 2022 at 5:33 PM wrote: > > > > > > From: Martin Wilck > > > > > > These messages are noisy in the

Re: [dm-devel] [PATCH v2 07/11] multipathd: use remove_map_callback for delayed reconfigure

2022-03-22 Thread Benjamin Marzinski
On Tue, Mar 22, 2022 at 4:08 AM Martin Wilck wrote: > > On Mon, 2022-03-21 at 19:34 -0500, Benjamin Marzinski wrote: > > On Fri, Mar 18, 2022 at 5:33 PM wrote: > > > > > > From: Martin Wilck > > > > > > If multipathd needs to delay re

Re: [dm-devel] [PATCH v2 06/11] libmultipath: add callback for remove_map()

2022-03-22 Thread Benjamin Marzinski
On Tue, Mar 22, 2022 at 3:35 AM Martin Wilck wrote: > > On Mon, 2022-03-21 at 19:28 -0500, Benjamin Marzinski wrote: > > On Fri, Mar 18, 2022 at 5:33 PM wrote: > > > > > > From: Martin Wilck > > > > > > This callback is be used by multipat

Re: [dm-devel] [PATCH v2 11/11] multipathd: remove unhelpful startup / shutdown messages

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > These messages are noisy in the system log without being actually helpful. I've actually found the "start up" and "shut down" messages useful a number of times, for tracking when multipathd starts up and shuts down. Since people

Re: [dm-devel] [PATCH v2 10/11] multipathd: log state changes

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipathd/main.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/multipathd/main.c b/multipathd/main.c >

Re: [dm-devel] [PATCH v2 09/11] multipathd: improve logging of reconfigure()

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > Print a message when reconfigure() actually starts doing something, > and when a reconfigure() call is delayed. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipa

Re: [dm-devel] [PATCH v2 08/11] libmultipath: warn only once about deprecated options

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/dict.c | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/d

Re: [dm-devel] [PATCH v2 07/11] multipathd: use remove_map_callback for delayed reconfigure

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > If multipathd needs to delay reconfigure() because it's waiting for a map > creation uevent, it can happen that child() isn't woken up if the map > being waited for is removed before the uevent arrives. Fix this by > unblocking

Re: [dm-devel] [PATCH v2 06/11] libmultipath: add callback for remove_map()

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > This callback is be used by multipathd to unblock pending > reconfigure requests if a map is removed that multipathd is currently > waiting for. > > Signed-off-by: Martin Wilck > --- > libmultipath/libmultipath.version | 3 ++- >

Re: [dm-devel] [PATCH v2 05/11] multipathd: remove volatile qualifier from running_state

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > running_state is only accessed while holding the config_lock, the > volatile qualifier is superfluous. > > Suggested-by: Benjamin Marzinski > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzins

Re: [dm-devel] [PATCH v2 04/11] multipathd: reset __delayed_reconfig from ev_add_map()

2022-03-21 Thread Benjamin Marzinski
onfigure_pending condition. > > Also, these schedule_reconfigure() callers don't really request a > reconfigure() call; they just unblock processing previously requested > reconfigure() calls. Add a new helper, unblock_reconfigure(), that > does just that. > > Suggested-by: Be

Re: [dm-devel] [PATCH v2 03/11] multipathd: avoid busy loop in child() for delayed reconfigure

2022-03-21 Thread Benjamin Marzinski
this situation. This means that child() > needs to poll for reconfigure_pending besides running_state changes. > > Fixes: 250708c ("multipathd: improve delayed reconfigure") > Fixes: 4b104e6 ("multipathd: pass in the type of reconfigure") > Si

Re: [dm-devel] [PATCH v2 01/11] multipathd: child(): remove superfluous if condition

2022-03-21 Thread Benjamin Marzinski
On Fri, Mar 18, 2022 at 5:33 PM wrote: > > From: Martin Wilck > > No need to test for state == DAEMON_CONFIGURE at this point, we > know that this is the case. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipathd/main.c | 32 ++

Re: [dm-devel] [PATCH 5/5] multipathd: remove volatile qualifier from running_state

2022-03-16 Thread Benjamin Marzinski
On Mon, Mar 14, 2022 at 10:30:36PM +0100, mwi...@suse.com wrote: > From: Martin Wilck Reviewed-by: Benjamin Marzinski > > running_state is only accessed while holding the config_lock, the > volatile qualifier is superfluous. > > Suggested-by: Benjamin Marzinski > Signed

Re: [dm-devel] [PATCH 3/5] multipathd: avoid busy loop in child() for delayed reconfigure

2022-03-16 Thread Benjamin Marzinski
irely, to avoid this situation. This means that child() > needs to poll for reconfigure_pending besides running_state changes. > Reviewed-by: Benjamin Marzinski With the understanding that this fix still leaves a bug that needs to be resolved. > Fixes: 250708c ("multipathd: improve de

Re: [dm-devel] [PATCH 1/5] multipathd: child(): remove superfluous if condition

2022-03-16 Thread Benjamin Marzinski
On Mon, Mar 14, 2022 at 10:30:32PM +0100, mwi...@suse.com wrote: > From: Martin Wilck Reviewed-by: Benjamin Marzinski > > No need to test for state == DAEMON_CONFIGURE at this point, we > know that this is the case. > > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 4/5] multipathd: reset __delayed_reconfig from ev_add_map()

2022-03-16 Thread Benjamin Marzinski
ll be delayed, but if another reconfigure was requested not only would it happen, but if the "__delayed_reconfig = false;" line was back, __delayed_reconfig would go back to the correct value. -Ben > Suggested-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 2/2] multipathd: don't keep looping when config is delayed

2022-03-11 Thread Benjamin Marzinski
On Fri, Mar 11, 2022 at 10:21:29AM +, Martin Wilck wrote: > On Thu, 2022-03-10 at 20:02 -0600, Benjamin Marzinski wrote: > > If a reconfigure is delayed because multipathd is waiting on a change > > uevent for a new multipath device, the main thread will not pause, > &

[dm-devel] [PATCH 1/2] multipathd: set reload_type in when calling reconfigure()

2022-03-10 Thread Benjamin Marzinski
configure() and reconfigure() to static functions. Signed-off-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index f2c0b280

[dm-devel] [PATCH 2/2] multipathd: don't keep looping when config is delayed

2022-03-10 Thread Benjamin Marzinski
be delayed. To avoid this, when schedule_reconfigure() is called and the daemon is currently in DAEMON_CONFIGURE or DAEMON_RUNNING, __delayed_reconfig should be cleared, so switching to DAEMON_IDLE will instead become DAEMON_CONFIGURE. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 2 ++ 1

[dm-devel] [PATCH 0/2] fix looping when reconfigure is delayed

2022-03-10 Thread Benjamin Marzinski
This patchset fixes Guozhonghua's looping issue for me. It's the first patch from Martin's patchset, plus a simple patch to make sure that we really do switch to the idle state when we're delaying the reconfigure, and that we stop delaying the reconfigure if we schedule a reconfigure. Benjamin

Re: [dm-devel] [PATCH] kpartx: Add -P option for partition scanning

2022-03-02 Thread Benjamin Marzinski
On Wed, Mar 02, 2022 at 12:07:11AM +, Ritika Srivastava wrote: > On 2/28/22, 2:44 PM, "Benjamin Marzinski" wrote: > > > So unless I'm missing something, we'd only really want this for removing > > a kpartx device, in the case where somehow you have /de

Re: [dm-devel] [PATCH] kpartx: Add -P option for partition scanning

2022-02-28 Thread Benjamin Marzinski
On Tue, Feb 22, 2022 at 10:16:35PM +, Ritika Srivastava wrote: > Ben, > > Thank you for reviewing this. > > On 2/22/22, 11:32 AM, "Benjamin Marzinski" wrote: > >> And I'm trying to figure out why you want to create /dev/loop0p1 if you >

Re: [dm-devel] [PATCH] kpartx: Add -P option for partition scanning

2022-02-22 Thread Benjamin Marzinski
On Tue, Feb 22, 2022 at 06:59:10PM +, Ritika Srivastava wrote: > On 2/22/22, 10:28 AM, "Benjamin Marzinski" wrote: > > On Fri, Feb 11, 2022 at 12:41:48PM -0800, Ritika Srivastava wrote: > >> Add -P, partition scanning option to kpartx which would set >

Re: [dm-devel] [PATCH] kpartx: Add -P option for partition scanning

2022-02-22 Thread Benjamin Marzinski
On Fri, Feb 11, 2022 at 12:41:48PM -0800, Ritika Srivastava wrote: > Add -P, partition scanning option to kpartx which would set > LO_FLAGS_PARTSCAN flag during loop device creation. > This option is same as losetup -P option. I'm confused here. What's the benefit of doing this? Doesn't this

Re: [dm-devel] [PATCH 0/4] libmultipath: utter less dev_loss_tmo warnings

2022-02-21 Thread Benjamin Marzinski
> > This patch set makes changes the code to print this warning only once per > unsupported > protocol. It would have been simpler to never print the warning more than > once, but > I figured that might suppress important information in some cases. > > Regards > Martin Reviewed-

[dm-devel] [PATCH] libmultipath: fix printing native nvme multipath topology.

2022-02-15 Thread Benjamin Marzinski
ts format specifiers, to append_strbuf_str(), which doesn't, while still keeping the same string, "%%w [%%G]:%%d %%s". Remove the extra percent signs, since they don't need to be escaped in append_strbuf_str(). Fixes: 2f05df4 ("libmultipath: use strbuf in print.c") Signed-off-b

[dm-devel] [PATCH] multipathd: disallow changing to/from fpin marginal paths on reconfig

2022-02-14 Thread Benjamin Marzinski
econfigure. Signed-off-by: Benjamin Marzinski Cc: Muneendra Kumar --- multipath/multipath.conf.5 | 13 - multipathd/main.c | 9 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 746bb60c

Re: [dm-devel] [PATCH v3] multipathd: handle fpin events

2022-02-10 Thread Benjamin Marzinski
On Thu, Feb 10, 2022 at 05:00:09PM +, Martin Wilck wrote: > Hi Muneendra, > > coverity found some defects in your patch. Please help me review them, > see attachment. It's well possible that they're false positives, but > please double-check. > > Thanks > Martin > > Date: Thu, 10 Feb 2022

Re: [dm-devel] [PATCH 2/2] libmultipath: add %L path wildcard for 64-bit hex LUN

2022-02-10 Thread Benjamin Marzinski
00a0|0.0.50c0 > |0x500507680b26c448|0x00a00000 > > Likewise, add a field lun_hex for JSON path output. > Reviewed-by: Benjamin Marzinski > Reviewed-by: Benjamin Block > Signed-off-by: Steffen Maier > --- > libmultipath/print.c | 20

Re: [dm-devel] [PATCH 1/2] libmultipath: support host adapter name lookup for s390x ccw bus

2022-02-10 Thread Benjamin Marzinski
On Wed, Feb 09, 2022 at 08:47:12PM +0100, Steffen Maier wrote: > There are also (FCP) HBAs that appear on a bus different from PCI. > > Complements v0.6.0 commit > 01ab2a468ea2 ("libmultipath: Add additional path wildcards"). > > With that we can easily get the full FCP addressing triplet >

Re: [dm-devel] [PATCH] kpartx.rules: skip MD devices

2022-02-08 Thread Benjamin Marzinski
-mapper: ioctl: error adding target to table > > Skip creating partition mappings on MD components. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > kpartx/kpartx.rules | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/kpartx/

Re: [dm-devel] [PATCH v2 5/6] multipath: Makefile: modules-load.d file for SCSI device handlers

2022-02-08 Thread Benjamin Marzinski
statement like this: > > softdep scsi_mod post: scsi_dh_alua scsi_dh_rdac > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > Makefile.inc | 5 + > multipath/Makefile | 6 ++ > multipath/scsi_dh.conf | 2 ++ > 3 files changed, 13

Re: [dm-devel] [PATCH] libmultipath: hwtable: use ALUA for all LIO targets

2022-02-08 Thread Benjamin Marzinski
On Wed, Feb 02, 2022 at 12:50:25PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > LIO supports ALUA for all backends. Use it by default. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/hwtable.c | 2 +- > 1 file changed, 1

Re: [dm-devel] [PATCH 5/6] multipath: Makefile: modules-load.d file for SCSI device handlers

2022-02-03 Thread Benjamin Marzinski
On Thu, Feb 03, 2022 at 08:20:10AM +0100, Martin Wilck wrote: > On Wed, 2022-02-02 at 18:37 -0600, Benjamin Marzinski wrote: > > On Wed, Feb 02, 2022 at 12:40:23AM +0100, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > The kernel's autoload mechan

Re: [dm-devel] [PATCH 6/6] README.md: add basic information about building multipath-tools

2022-02-02 Thread Benjamin Marzinski
On Wed, Feb 02, 2022 at 12:40:24AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > README.md | 56 +++ > 1 file changed, 56 insertions(+) > >

Re: [dm-devel] [PATCH 2/6] multipath-tools: Makefile.inc: delete obsolete comment

2022-02-02 Thread Benjamin Marzinski
On Wed, Feb 02, 2022 at 12:40:20AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > We haven't used the options since 0.4.5. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > Makefile.inc | 6 -- > 1 file changed, 6 deletions(-) >

Re: [dm-devel] [PATCH 4/6] multipathd.service: drop ExecStartPre for loading dm-multipath

2022-02-02 Thread Benjamin Marzinski
On Wed, Feb 02, 2022 at 12:40:22AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > As we install a modules-load.d file now, no need to call modprobe > in ExecStartPre any more. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipath

Re: [dm-devel] [PATCH 3/6] multipath-tools: install modules-load.d/multipath.conf

2022-02-02 Thread Benjamin Marzinski
-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > Makefile.inc| 1 + > multipath/Makefile | 3 +++ > multipath/modules-load.conf | 3 +++ > 3 files changed, 7 insertions(+) > create mode 100644 multipath/modules-load.conf > > diff --git

Re: [dm-devel] [PATCH 1/6] multipath/Makefile: use $(udevrulesdir)

2022-02-02 Thread Benjamin Marzinski
On Wed, Feb 02, 2022 at 12:40:19AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipath/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/multipath/Makef

Re: [dm-devel] [PATCH 5/6] multipath: Makefile: modules-load.d file for SCSI device handlers

2022-02-02 Thread Benjamin Marzinski
On Wed, Feb 02, 2022 at 12:40:23AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > The kernel's autoload mechanism for SCSI device handlers doesn't > work during SCSI device probing. While it's possible to load and > attach device handlers after probing, it has disadvantages: the >

Re: [dm-devel] [PATCH v2] multipathd: handle fpin events

2022-02-02 Thread Benjamin Marzinski
process the ELS frames and moves the devices > > paths > > which are affected due to link integrity to marginal path groups. > > This also sets the associated portstate to marginal. > > The paths which are set to marginal path group will be unset > > on receiving t

Re: [dm-devel] [PATCH v2 0/9] multipathd: remove udev settle dependency

2022-01-26 Thread Benjamin Marzinski
On Mon, Jan 24, 2022 at 11:19:53AM +, Martin Wilck wrote: > On Wed, 2021-11-17 at 15:21 -0600, Benjamin Marzinski wrote: > > My late testing has revealed an issue with this patch with explicit > ALUA. It's similar to what you solved with the "ghost_delay" p

[dm-devel] [PATCH] libmultipath: use asprintf() to allocate prefixed_uuid

2022-01-25 Thread Benjamin Marzinski
fined here 484 | sprintf(prefixed_uuid, UUID_PREFIX "%s", mpp->wwid); | ^~ Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[dm-devel] [PATCH 3/3] multipathd: trigger udev change on path addition

2022-01-17 Thread Benjamin Marzinski
it. Signed-off-by: Benjamin Marzinski --- libmultipath/libmultipath.version | 1 + multipathd/main.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libmultipath/libmultipath.version b/libmultipath/libmultipath.version index d8cee0c3..b663cb29 100644 --- a/libmultipath

[dm-devel] [PATCH 1/3] libmultipath: fix disassemble status for historical-service-time PS

2022-01-17 Thread Benjamin Marzinski
, causing it to fail at disassembling the status of devices that use historical-service-time path selector. Now multipath actually checks the number of group arguments, and skips them. Signed-off-by: Benjamin Marzinski --- libmultipath/dmparser.c | 14 -- 1 file changed, 12 insertions(+), 2

[dm-devel] [PATCH 0/3] Misc Multipath fixes

2022-01-17 Thread Benjamin Marzinski
in a window right after the WWID has been added to the WWIDs file, if multipath is using a find_multipaths setting that relies on the wwid being in the WWIDs file (all settings but greedy or smart). Benjamin Marzinski (3): libmultipath: fix disassemble status for historical-service-time PS

[dm-devel] [PATCH 2/3] libmultipath: make helper function to trigger path uevents

2022-01-17 Thread Benjamin Marzinski
Pull the code that checks if a path needs to trigger a uevent, and triggers, out of trigger_paths_udev_change() and into a new function, trigger_path_udev_change(). This function will be used separately by a future patch. No functional changes. Signed-off-by: Benjamin Marzinski --- libmultipath

Re: [dm-devel] [PATCH] dm rq: clear cloned bio ->bi_bdev to fix I/O accounting

2022-01-17 Thread Benjamin Marzinski
bio = bio_clone_fast(bio_src, gfp_mask, bs); > if (!bio) > goto free_and_out; > + bio->bi_bdev = rq->q->disk->part0; > > if (bio_ctr && bio_ctr(bio, bio_src, data)) >

[dm-devel] [PATCH] dm rq: clear cloned bio ->bi_bdev to fix I/O accounting

2022-01-14 Thread Benjamin Marzinski
he cloned bio's ->bi_bdev and have __blk_account_io_start() fall back to using rq->rq_disk->part0 for the I/O accounting. Signed-off-by: Benjamin Marzinski --- drivers/md/dm-rq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 579ab6183d4d..42

[dm-devel] [PATCH 3/3] libmultipath: don't enter recovery mode with pending paths

2021-12-22 Thread Benjamin Marzinski
ker hasn't completed yet. Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index f1031f61..6c23df86 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/str

[dm-devel] [PATCH 2/3] libmultipath: simplify out __set_no_path_retry()

2021-12-22 Thread Benjamin Marzinski
The only caller of __set_no_path_retry() is set_no_path_retry(), so remove the define and the unneeded arguments from the function. Signed-off-by: Benjamin Marzinski --- libmultipath/libmultipath.version | 2 +- libmultipath/structs_vec.c| 11 +-- libmultipath/structs_vec.h

[dm-devel] [PATCH 1/3] libmultipath: fix DI_NOIO pathinfo PATH_PENDING handling

2021-12-22 Thread Benjamin Marzinski
pp->state should only be set to PATH_PENDING if it is currently in the PATH_UNCHECKED or PATH_WILD states. Otherwise, it should retain its current state. Fix this in pathinfo() calls with DI_NOIO, to match with the rest of the code. Signed-off-by: Benjamin Marzinski --- libmultip

[dm-devel] [PATCH 0/3] Don't enter recovery move over pending paths

2021-12-22 Thread Benjamin Marzinski
After commit 2e61b8fb, I started seeing multipath devices switching into recovery mode briefly on startup. They come back out shortly, so unless no_path_retry is set very low, this won't be an issue, but multipathd shouldn't enter recovery mode at all over pending paths. Benjamin Marzinski (3

Re: [dm-devel] [PATCH] multipathd: handle fpin events

2021-12-20 Thread Benjamin Marzinski
On Tue, Dec 07, 2021 at 09:11:55AM +, Martin Wilck wrote: > On Tue, 2021-12-07 at 09:19 +1000, Erwin van Londen wrote: > > Moreover, the existing marginal paths handler has two different modes > of operation, the "classical" one that disables reinstate, and the > more modern one that uses

Re: [dm-devel] [PATCH 0/5] libmpathpersist: cleanup ABI and headers

2021-12-17 Thread Benjamin Marzinski
en removed from the LIBMPATHPERSIST versioned > ABI. > > The set also contains some other minor header file cleanups. No actual code > flow is changed, only code shuffled around. > > Regards > Martin For the set Reviewed-by: Benjamin Marzinski > > Martin Wilck (5): >

Re: [dm-devel] [PATCH v2 03/48] libmultipath: add optional wakeup functionality to lock.c

2021-12-16 Thread Benjamin Marzinski
On Wed, Dec 15, 2021 at 10:01:34PM +0100, Martin Wilck wrote: > Hi Ben, > > On Wed, 2021-12-15 at 08:33 +0100, Martin Wilck wrote: > > > > I just wanted to say that my previous argument that addition or > > removal > > of symbols can be ignored was wrong, and that we should keep the > >

[dm-devel] [PATCH v2 2/3] multipathd: update dm_info on multipath change events

2021-12-15 Thread Benjamin Marzinski
When multipathd gets a change event for a multipath device, the dm info may have changed, so update it. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/multipathd/main.c b/multipathd/main.c index fe40f6e3

[dm-devel] [PATCH v2 3/3] multipathd: avoid unnecessary path read-only reloads

2021-12-15 Thread Benjamin Marzinski
/write before changing a multipath device from read-only to read/write. If the multipath device read-only state is unknown, assume that it needs to be reloaded. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 48 ++- 1 file changed, 47 insertions

[dm-devel] [PATCH v2 0/3] multipathd: avoid unnecessary read-only reloads

2021-12-15 Thread Benjamin Marzinski
structure in the multipath structure. This will require a major version bump for libmultipath, which I've not included. 0003: sysfs_get_ro() has been moved to mutlipathd, and needs_ro_update() has been changed to work with the embedded dmi structure. Benjamin Ma

[dm-devel] [PATCH v2 1/3] libmultipath: embed dm_info in multipath structure

2021-12-15 Thread Benjamin Marzinski
Instead of having multipath allocate its dm_info structure, it should just embed it to save on the extra allocations. This also lets us have only one function that all callers use to fill a dm_info structure. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 7

Re: [dm-devel] [PATCH] multipathd: avoid unnecessary path read-only reloads

2021-12-14 Thread Benjamin Marzinski
On Fri, Dec 03, 2021 at 08:25:00AM +, Martin Wilck wrote: > On Thu, 2021-11-18 at 16:47 -0600, Benjamin Marzinski wrote: > > +int > > +sysfs_get_ro (struct path *pp) > > +{ > > +   int ro; > > +   char buff[3]; /* Either "0\n\0" or

Re: [dm-devel] [PATCH v2 03/48] libmultipath: add optional wakeup functionality to lock.c

2021-12-14 Thread Benjamin Marzinski
On Wed, Dec 01, 2021 at 01:06:45PM +0100, Martin Wilck wrote: > On Tue, 2021-11-30 at 21:28 +0100, Martin Wilck wrote: > > On Tue, 2021-11-30 at 10:52 -0600, Benjamin Marzinski wrote: > > > On Mon, Nov 29, 2021 at 09:52:49PM +0100, Martin Wilck wrote: > > > > I agr

Re: [dm-devel] [PATCH 0/4] multipathd: service unit fixes

2021-12-09 Thread Benjamin Marzinski
On Tue, Dec 07, 2021 at 09:03:58PM +0100, mwi...@suse.com wrote: > From: Martin Wilck For the set: Reviewed-by: Benjamin Marzinski > > Hi Christophe, hi Ben, > > this set drops some directives from multipathd's service unit which > are to the best of my knowledge obs

Re: [dm-devel] [PATCH] multipathd: avoid unnecessary path read-only reloads

2021-12-06 Thread Benjamin Marzinski
On Fri, Dec 03, 2021 at 08:25:00AM +, Martin Wilck wrote: > On Thu, 2021-11-18 at 16:47 -0600, Benjamin Marzinski wrote: > > A mulitpath device can only be reloaded read/write when all paths are > > read/write. Also, whenever a read-only device is rescanned, the scsi > >

Re: [dm-devel] [PATCH 1/3] libmultipath: keep existing dm_info if you fail to get a new one

2021-12-06 Thread Benjamin Marzinski
On Fri, Dec 03, 2021 at 08:01:11AM +, Martin Wilck wrote: > On Thu, 2021-12-02 at 19:34 -0600, Benjamin Marzinski wrote: > > There are reasons that dm_get_info() can fail other than the > > multipath > > device not existing. If there is an existing dm_info structure and &

[dm-devel] [PATCH 1/3] libmultipath: keep existing dm_info if you fail to get a new one

2021-12-02 Thread Benjamin Marzinski
There are reasons that dm_get_info() can fail other than the multipath device not existing. If there is an existing dm_info structure and the call fails, don't free it. Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 24 ++-- 1 file changed, 14 insertions

[dm-devel] [PATCH 3/3] multipathd: avoid unnecessary path read-only reloads

2021-12-02 Thread Benjamin Marzinski
/write before changing a multipath device from read-only to read/write. If the multipath device read-only state is unknown, assume that it needs to be reloaded. Signed-off-by: Benjamin Marzinski --- libmultipath/libmultipath.version | 1 + libmultipath/sysfs.c | 22

[dm-devel] [PATCH 2/3] multipathd: update dm_info on multipath change events

2021-12-02 Thread Benjamin Marzinski
When multipathd gets a change event for a multipath device, the dm info may have changed, so update it. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/multipathd/main.c b/multipathd/main.c index 7a57a798..5cb70575 100644

[dm-devel] [PATCH 0/3] multipathd: avoid unnecessary read-only reloads

2021-12-02 Thread Benjamin Marzinski
This patchset is an expanded version of my single patch "multipathd: avoid unnecessary path read-only reloads" That also makes some changes to how the multipath dm_info is handled. Benjamin Marzinski (3): libmultipath: keep existing dm_info if you fail to get a new one multipat

Re: [dm-devel] [PATCH 00/11] Last-minute patches for multipath-tools

2021-12-02 Thread Benjamin Marzinski
On Thu, Dec 02, 2021 at 05:06:40PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, hi Ben, > Reviewed-by: Benjamin Marzinski > here are some last-minute fixes that I'd like to have added to > the currently pending multipath-tools update. None of them

Re: [dm-devel] [PATCH 02/11] multipath-tools: generate abi without version script

2021-12-02 Thread Benjamin Marzinski
On Thu, Dec 02, 2021 at 05:06:43PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > I assume that am supposed to ignore this patch, and look at "multipath-tools: generate abi with dummy version script" instead, right? -Ben > The purpose of the "abi" makefile target is to detect ABI

Re: [dm-devel] [PATCH] multipathd.service: add dependency on systemd-udevd-kernel.socket

2021-12-02 Thread Benjamin Marzinski
attempt to trigger uevents using > sysfs. For these events to be processed, the udev kernel socket must be > listening. For that, it's sufficient to depend on systemd-udevd-kernel.socket, > which will start udevd on demand if it isn't running. > > Signed-off-by: Martin Wilck Rev

Re: [dm-devel] [PATCH v2 08/21] libmultipath (coverity): fix tainted values in alua_rtpg.c

2021-12-01 Thread Benjamin Marzinski
On Wed, Dec 01, 2021 at 01:36:37PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Coverity needs tainted values limited by constant expressions. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/prioritizers/alua_rtpg.c | 13 +++

Re: [dm-devel] [PATCH v2 06/21] multipath-tools: add tests for broken VPD page 83

2021-12-01 Thread Benjamin Marzinski
On Wed, Dec 01, 2021 at 01:36:35PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Add some tests for the consistency checks in the VPD. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/vpd.c | 144

Re: [dm-devel] [PATCH v2 07/21] libmultipath: use strbuf in parse_vpd_pg83()

2021-12-01 Thread Benjamin Marzinski
On Wed, Dec 01, 2021 at 01:36:36PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > By using the strbuf API, the code gets more readable, as we need > less output size checks. > > While at it, avoid a possible crash by passing a NULL pointer > to memchr(). >

Re: [dm-devel] [PATCH v2 05/21] libmultipath (coverity): improve input checking in parse_vpd_pg83

2021-12-01 Thread Benjamin Marzinski
for coverity > without using a constant boundary (WWID_SIZE) for "len" in > parse_vpd_pg80() and for "vpd_len" in parse_vpd_pg83(), even > though the computed boundaries are tighter than the constant > ones. > > Signed-off-by: Martin Wilck Review

Re: [dm-devel] [PATCH v2 00/13] multipath-tools: improvements for pretty-printing code

2021-11-30 Thread Benjamin Marzinski
ce fixes > - 12/13: new, fix a compile error with clang-13 > - 13/13: new, fix an asan error reported by Lixiaokeng > > As always, feedback welcome > Martin > For the set: Reviewed-by: Benjamin Marzinski > Martin Wilck (13): > libmultipath: make multipath_data etc

Re: [dm-devel] [PATCH 05/21] libmultipath (coverity): improve input checking in parse_vpd_pg83

2021-11-30 Thread Benjamin Marzinski
On Tue, Nov 30, 2021 at 09:14:10PM +0100, Martin Wilck wrote: > On Tue, 2021-11-30 at 11:30 -0600, Benjamin Marzinski wrote: > > > > If you export scsi IDs from sg_inq, it will print them out until it > > hits an error, so I would prefer if we used the best designator we

Re: [dm-devel] [PATCH 07/21] libmultipath: use strbuf in parse_vpd_pg83()

2021-11-30 Thread Benjamin Marzinski
On Tue, Nov 30, 2021 at 12:26:47PM +0100, Martin Wilck wrote: > On Mon, 2021-11-29 at 19:18 -0600, Benjamin Marzinski wrote: > > On Fri, Nov 19, 2021 at 12:13:24AM +0100, mwi...@suse.com wrote: > > > -   out[0] = '1'; > > > -   len = 1; >

Re: [dm-devel] [PATCH 05/21] libmultipath (coverity): improve input checking in parse_vpd_pg83

2021-11-30 Thread Benjamin Marzinski
On Tue, Nov 30, 2021 at 12:21:44PM +0100, Martin Wilck wrote: > On Mon, 2021-11-29 at 19:17 -0600, Benjamin Marzinski wrote: > > On Fri, Nov 19, 2021 at 12:13:22AM +0100, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > Check offsets and ot

Re: [dm-devel] [PATCH v2 03/48] libmultipath: add optional wakeup functionality to lock.c

2021-11-30 Thread Benjamin Marzinski
On Mon, Nov 29, 2021 at 09:52:49PM +0100, Martin Wilck wrote: > On Mon, 2021-11-29 at 13:27 -0600, Benjamin Marzinski wrote: > > On Wed, Nov 24, 2021 at 10:20:53PM +0100, Martin Wilck wrote: > > > On Wed, 2021-11-24 at 14:41 -0600, Benjamin Marzinski wrote: > > > >

Re: [dm-devel] [PATCH v3 30/35] multipathd: uxlsnr: add idle notification

2021-11-29 Thread Benjamin Marzinski
cs lock, > avoiding any waiting for other threads to finish. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipathd/uxlsnr.c | 183 +--- > 1 file changed, 121 insertions(+), 62 deletions(-) > > diff

Re: [dm-devel] [PATCH v2 30/48] multipathd: uxlsnr: add idle notification

2021-11-29 Thread Benjamin Marzinski
On Fri, Nov 26, 2021 at 03:23:18PM +0100, Martin Wilck wrote: > On Wed, 2021-11-24 at 19:08 -0600, Benjamin Marzinski wrote: > > On Thu, Nov 18, 2021 at 11:58:22PM +0100, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > The previous patches add

Re: [dm-devel] [PATCH 00/21] multipath-tools: coverity fixes

2021-11-29 Thread Benjamin Marzinski
assifications, I have been able to bring the > defect count all the way down to zero. > > Most of these patches fix defects reported by coverity. Some > fix other things that occured to me while working on this. > With the exception of 0005, 0007 and 0008, Reviewed-by: Benj

Re: [dm-devel] [PATCH 08/21] libmultipath (coverity): fix tainted values in alua_rtpg.c

2021-11-29 Thread Benjamin Marzinski
On Fri, Nov 19, 2021 at 12:13:25AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Coverity needs tainted values limited by constant expressions. > > Signed-off-by: Martin Wilck > --- > libmultipath/prioritizers/alua_rtpg.c | 13 ++-- > libmultipath/prioritizers/alua_spc3.h |

Re: [dm-devel] [PATCH 07/21] libmultipath: use strbuf in parse_vpd_pg83()

2021-11-29 Thread Benjamin Marzinski
On Fri, Nov 19, 2021 at 12:13:24AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > By using the strbuf API, the code gets more readable, as we need > less output size checks. > > While at it, avoid a possible crash by passing a NULL pointer > to memchr(). > > Signed-off-by: Martin Wilck

Re: [dm-devel] [PATCH 05/21] libmultipath (coverity): improve input checking in parse_vpd_pg83

2021-11-29 Thread Benjamin Marzinski
On Fri, Nov 19, 2021 at 12:13:22AM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Check offsets and other obvious errors in the VPD83 data. > > The original reason to do this was to fix "tained scalar" > warnings from coverity. But this doesn't suffice for coverity > without using a

Re: [dm-devel] [PATCH v3 32/35] multipathd: uxlsnr: use poll loop for sending, too

2021-11-29 Thread Benjamin Marzinski
On Sat, Nov 27, 2021 at 04:19:26PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > send_packet() may busy-loop. By polling for POLLOUT, we can > avoid that, even if it's very unlikely in practice. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski &

Re: [dm-devel] [PATCH v2 03/48] libmultipath: add optional wakeup functionality to lock.c

2021-11-29 Thread Benjamin Marzinski
On Wed, Nov 24, 2021 at 10:20:53PM +0100, Martin Wilck wrote: > On Wed, 2021-11-24 at 14:41 -0600, Benjamin Marzinski wrote: > > On Thu, Nov 18, 2021 at 11:57:55PM +0100, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > Have struct mutex_l

<    1   2   3   4   5   6   7   8   9   10   >