[dm-devel] [PATCH 1/4] libmultipath: don't print garbage keywords

2022-10-11 Thread Benjamin Marzinski
If snprint_keyword() failed to correctly set up sbuf, don't print it. Instead, return an error. Signed-off-by: Benjamin Marzinski --- libmpathutil/parser.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libmpathutil/parser.c b/libmpathutil/parser.c index 014d9b83

[dm-devel] [PATCH 2/4] libmultipath: avoid STRBUF_ON_STACK with cancellation points

2022-10-11 Thread Benjamin Marzinski
, the keyword print functions can call cancellation points. Because of all this, I did not see any safe uses of STRBUF_ON_STACK() outside of the unit tests. Replace them all with pthread cleanup handlers. Signed-off-by: Benjamin Marzinski --- libmpathutil/parser.c| 5

[dm-devel] [PATCH 0/4] remove dangerous cleanup __attribute__ uses

2022-10-11 Thread Benjamin Marzinski
. This patchset removes all these uses in cases where the code is run by multipathd and includes a cancellation point in the variables scope (usually condlog(), which calls fprintf(), a cancellation point, the way multipathd is usually run). Benjamin Marzinski (4): libmultipath: don't print

[dm-devel] [PATCH 8/8] libmultipath: enforce queue_mode bio for nmve:tcp paths

2022-10-07 Thread Benjamin Marzinski
that include nvme:tcp paths. Multipath devices now automatically add the "queue_mode bio" feature if they include nvme:tcp paths. If a multipath devices was created with "queue_mode rq", it will disallow the addition of nvme:tcp paths. Signed-off-by: Benjamin Marzinski --- libmultipat

[dm-devel] [PATCH 4/8] libmultipath: fix queue_mode feature handling

2022-10-07 Thread Benjamin Marzinski
device-mapper is not able to change the queue_mode on a table reload. Make sure that when multipath sets up the map, both on regular reloads and reconfigures, it keeps the queue_mode the same. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 4 +++ libmultipath/dmparser.c

[dm-devel] [PATCH 7/8] libmultipath: get nvme path transport protocol

2022-10-07 Thread Benjamin Marzinski
Read the transport protocol from /sys/block/nvmeXnY/device/transport. Update protocol_name[] and bus_protocol_id() to store the nvme protocol names after the scsi protocol names. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 18 -- libmultipath/structs.c

[dm-devel] [PATCH 5/8] multipath tests: tests for reconcile_features_with_queue_mode

2022-10-07 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- tests/Makefile | 2 + tests/features.c | 232 ++- 2 files changed, 233 insertions(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index ccdfbd15..bc9380f8 100644 --- a/tests/Makefile +++ b/tests

[dm-devel] [PATCH 6/8] libmultipath: prepare proto_id for use by non-scsi devivces

2022-10-07 Thread Benjamin Marzinski
Make sure that when we are checking for a scsi protocol, we are first checking that we are working with a scsi path. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 9 + libmultipath/discovery.c | 13 - libmultipath/print.c | 6

[dm-devel] [PATCH 3/8] multipath tests: tests for adding and removing features

2022-10-07 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- tests/Makefile | 2 +- tests/features.c | 319 +++ 2 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 tests/features.c diff --git a/tests/Makefile b/tests/Makefile index 109ea75b..ccdfbd15

[dm-devel] [PATCH 1/8] libmultipath: cleanup remove_feature

2022-10-07 Thread Benjamin Marzinski
to be removed contains leading or trailing whitespace, the function can be significanly simplified. Signed-off-by: Benjamin Marzinski --- libmultipath/structs.c | 82 +++--- 1 file changed, 29 insertions(+), 53 deletions(-) diff --git a/libmultipath/structs.c b

[dm-devel] [PATCH 0/8] mutipath: handle nvme:tcp paths better

2022-10-07 Thread Benjamin Marzinski
device includes a nvme:tcp path, it will have queue_mode set to bio. Benjamin Marzinski (8): libmultipath: cleanup remove_feature libmultipath: cleanup add_feature multipath tests: tests for adding and removing features libmultipath: fix queue_mode feature handling multipath tests: tests

[dm-devel] [PATCH 2/8] libmultipath: cleanup add_feature

2022-10-07 Thread Benjamin Marzinski
of a larger token. Finally, it did unnecessary work. By using asprintf() to create the string, the function can be signifcantly simplified. Signed-off-by: Benjamin Marzinski --- libmultipath/structs.c | 49 +- 1 file changed, 24 insertions(+), 25 deletions(-) diff

Re: [dm-devel] [PATCH V2 0/6] allowing path checking to be interrupted.

2022-09-15 Thread Benjamin Marzinski
believe that this is likely causing a real impact on the checker speed, I'm not sure that we're looking for results like this. Are you seeing That "path checkers took longer than ..." message? How long does it say the checker is taking (and what do you have max_polling_interval set

[dm-devel] [PATCH] multipathd: fix read past end of of buffer in sending reply

2022-09-07 Thread Benjamin Marzinski
Reduce the send() length for the uxlsnr reply, by the number of bytes already sent Signed-off-by: Benjamin Marzinski --- multipathd/uxlsnr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c index 23cb123d..238744b7 100644

Re: [dm-devel] [PATCH 0/3] multipath-tools documentation fixes

2022-09-06 Thread Benjamin Marzinski
On Sat, Sep 03, 2022 at 01:11:25PM +0200, mwi...@suse.com wrote: > From: Martin Wilck For the set: Reviewed-by: Benjamin Marzinski > > Martin Wilck (3): > multipathd: add multipathc.8 manual page > multipathd.8: remove misleading paragraph about multipath > multipath

Re: [dm-devel] [PATCH 00/16] multipath-tools: minor fixes and build improvements

2022-09-02 Thread Benjamin Marzinski
On Thu, Sep 01, 2022 at 06:09:36PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Ben, hi Christophe, > > here's a set of minor fixes for multipath-tools. For the set: Reviewed-by: Benjamin Marzinski > > Regards > Martin > > Martin Wilck (16): >

Re: [dm-devel] [PATCH v4 10/12] multipathd: exec multipathc in interactive mode

2022-08-31 Thread Benjamin Marzinski
for "multipath -k", > by just exec()ing the multipathc client. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipathd/Makefile | 3 ++- > multipathd/main.c | 15 +-- > multipathd/multipathc.c | 25

Re: [dm-devel] [PATCH v4 12/12] multipathd: fix use-after-free in handle_path_wwid_change()

2022-08-31 Thread Benjamin Marzinski
On Tue, Aug 30, 2022 at 09:27:13PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Found by coverity (defect #380536). > > Fixes: b4eb57e ("libmultipath, multipathd: log failure setting sysfs > attributes") Reviewed-by: Benjamin Marzinski > --- > mul

Re: [dm-devel] [PATCH v4 09/12] multipathc: add new interactive client program

2022-08-31 Thread Benjamin Marzinski
it can link to libreadline > without license conflict. > > Signed-off-by: Martin Wilck > Reviewed-by: Benjamin Marzinski Reviewed-by: Benjamin Marzinski > --- > .gitignore | 1 + > multipathd/Makefile | 24 ++-- > multipathd/cli.c| 130 ++

Re: [dm-devel] [PATCH v4 01/12] multipathd: replace libreadline with getline()

2022-08-31 Thread Benjamin Marzinski
le.inc; it is used if > READLINE is unset. Compiling with READLINE=libreadline or READLINE=libedit > remains possible. > > Signed-off-by: Hannes Reinecke > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > Makefile.inc| 4 ++-- > multipathd/cl

Re: [dm-devel] [PATCH v4 0/5] multipath: optimizations for large mptable

2022-08-29 Thread Benjamin Marzinski
On Fri, Aug 26, 2022 at 08:05:51PM +0200, mwi...@suse.com wrote: > From: Martin Wilck For the set: Reviewed-by: Benjamin Marzinski > > We observe that multipath operations take a long time if the multipaths > section in multipath.conf contains a lot of alias settings > (100

[dm-devel] [PATCH] multipathd: check for command overflow

2022-08-29 Thread Benjamin Marzinski
. Since the size argument to snprintf() is unsigned, after an overflow it will be a huge number, instead of a negative one, meaning that it will continue printing past the end of the buffer. Check for overflow after each snprintf() to avoid this. Signed-off-by: Benjamin Marzinski --- multipathd/main.c

Re: [dm-devel] [PATCH v3 00/11] Split libmultipath and libmpathutil

2022-08-29 Thread Benjamin Marzinski
On Mon, Aug 22, 2022 at 11:22:49PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The CI found a few more glitches in my v2 patch set. Not reposting > the entire set here, just the changed patches. For all except 01/11 & 10/11: Reviewed-by: Benjamin Marzinski >

Re: [dm-devel] [PATCH v2 10/11] multipathd: exec multipathc in interactive mode

2022-08-29 Thread Benjamin Marzinski
On Mon, Aug 22, 2022 at 10:41:18PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > A previous patch disabled interactive mode in multipathd, because > uxclnt() would return immediately without an input command > > With this patch, we reinstate interactive mode for "multipath -k", > by

Re: [dm-devel] [PATCH v2 01/11] multipathd: replace libreadline with getline()

2022-08-29 Thread Benjamin Marzinski
On Mon, Aug 22, 2022 at 10:41:09PM +0200, mwi...@suse.com wrote: > From: Hannes Reinecke > > libreadline changed the license to be incompatible with multipath-tools > usage, so replace it with a simple getline(). > > mwilck: Make this the default option via Makefile.inc; it is used if >

Re: [dm-devel] [PATCH 1/3] libmultipath: merge_mptable(): sort table by wwid

2022-08-25 Thread Benjamin Marzinski
On Thu, Aug 25, 2022 at 09:44:22AM +0200, Martin Wilck wrote: > On Wed, 2022-08-24 at 19:02 +0200, Martin Wilck wrote: > > On Wed, 2022-08-24 at 11:16 -0500, Benjamin Marzinski wrote: > > > On Wed, Aug 24, 2022 at 09:07:56AM +0200, Martin Wilck wrote: > > > > On

Re: [dm-devel] [PATCH 1/3] libmultipath: merge_mptable(): sort table by wwid

2022-08-24 Thread Benjamin Marzinski
On Wed, Aug 24, 2022 at 09:07:56AM +0200, Martin Wilck wrote: > On Tue, 2022-08-23 at 15:48 -0500, Benjamin Marzinski wrote: > > On Thu, Aug 18, 2022 at 11:06:28PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > If the mptable is very la

Re: [dm-devel] [PATCH 3/3] multipath: optimize program startup for frequent invocations

2022-08-23 Thread Benjamin Marzinski
bindings file is inconsistent. Move these > possibly slow initialization steps after these special command > invocations. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipath/main.c | 33 + > 1 file changed, 17 insertions(

Re: [dm-devel] [PATCH 2/3] libmultipath: check_alias_settings(): pre-sort mptable by alias

2022-08-23 Thread Benjamin Marzinski
On Thu, Aug 18, 2022 at 11:06:29PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > add_binding() contains an optimization; it assumes that the list of > bindings is alphabetically sorted by alias, and tries to maintain > this order. > > But conf->mptable is sorted by wwid. Therefore

Re: [dm-devel] [PATCH 1/3] libmultipath: merge_mptable(): sort table by wwid

2022-08-23 Thread Benjamin Marzinski
On Thu, Aug 18, 2022 at 11:06:28PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If the mptable is very large (for example, in a configuration with > lots of maps assigned individual aliases), merge_mptable may get > very slow because it needs to make O(n^2) string comparisons (with > n

Re: [dm-devel] [PATCH V2 3/6] multipathd: Occasionally allow waiters to interrupt checking paths

2022-08-22 Thread Benjamin Marzinski
On Mon, Aug 22, 2022 at 04:15:01PM +, Martin Wilck wrote: > On Wed, 2022-08-17 at 15:48 -0500, Benjamin Marzinski wrote: > > If there are a very large number of paths that all get checked at the > > same time, it is possible for the path checkers to starve out other > > v

[dm-devel] [PATCH 3/3] multipathd: Handle losing all path in update_map

2022-08-09 Thread Benjamin Marzinski
. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 4 1 file changed, 4 insertions(+) diff --git a/multipathd/main.c b/multipathd/main.c index 1380dd8b..f2890842 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -602,6 +602,10 @@ retry: goto fail

[dm-devel] [PATCH 0/3] mulitpathd: Handle losing all paths in update_map

2022-08-09 Thread Benjamin Marzinski
to remove the device, while respecting the flush_on_last_del and deferred_remove settings. Instead multipathd was simply reloading the map with no paths. This patchset fixes this. Benjamin Marzinski (3): multipathd: factor out the code to flush a map with no paths libmultipath: return success if we

[dm-devel] [PATCH 1/3] multipathd: factor out the code to flush a map with no paths

2022-08-09 Thread Benjamin Marzinski
The code to flush a multipath device because all of its paths have been removed will be used by another caller, so factor it out of ev_remove_path(). Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 56 --- 1 file changed, 29 insertions

[dm-devel] [PATCH 2/3] libmultipath: return success if we raced to remove a map and lost

2022-08-09 Thread Benjamin Marzinski
_dm_flush_map() was returning failure if it failed to remove a map, even if that was because the map had already been removed. Return success in this case. Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 4 multipathd/main.c| 4 2 files changed, 4 insertions

[dm-devel] [RFC PATCH] multipath: fix systemd timers in the initramfs

2022-08-05 Thread Benjamin Marzinski
d starts up pretty quickly, so it shouldn't be a problem to not trigger it here. Signed-off-by: Benjamin Marzinski --- Notes: I haven't seen this, but I do worry that path uevents could come in after initrd-cleanup.service has started. In this case the timers themselves could stop

[dm-devel] [PATCH 1/6] multipathd: Use regular pthread_mutex_t for waiter_lock

2022-07-29 Thread Benjamin Marzinski
waiter_lock doesn't need any special lock handing. Also make it static. Signed-off-by: Benjamin Marzinski --- multipathd/waiter.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/multipathd/waiter.c b/multipathd/waiter.c index 2a221465..52793698 100644

[dm-devel] [RFC PATCH 0/6] allowing path checking to be interrupted.

2022-07-29 Thread Benjamin Marzinski
k well under 10 seconds, most often under 5. I would only occasionally run into situations where a uxlsnr client would time out. Benjamin Marzinski (6): multipathd: Use regular pthread_mutex_t for waiter_lock multipathd: track waiters for mutex_lock multipathd: Occasionally allow w

[dm-devel] [PATCH 4/6] multipathd: allow uxlsnr clients to interrupt checking paths

2022-07-29 Thread Benjamin Marzinski
The uxlsnr clients never block waiting on the vecs->lock. Instead they register to get woken up and call trylock() when the lock is dropped. Add code to track when they are registered to get woken up. The checkerloop now checks if there are waiting uxlsnr clients as well. Signed-off-by: Benja

[dm-devel] [PATCH 5/6] multipathd: fix uxlsnr timeout

2022-07-29 Thread Benjamin Marzinski
sending the length, messing up communication with the client. If we are already sending a reply to the client, we should just finish the send. Disable timeouts in the CLT_SEND state. Signed-off-by: Benjamin Marzinski --- multipathd/uxlsnr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[dm-devel] [PATCH 6/6] multipathd: Don't check if timespec.tv_sec is zero

2022-07-29 Thread Benjamin Marzinski
checking if tv_sec is 0 is a holdover from before we had get_monotonic_time(), when we used to zero out tv_sec on failure. Also, use normalize_timespec() to simplify setting the sleep time. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 62

[dm-devel] [PATCH 3/6] multipathd: Occasionally allow waiters to interrupt checking paths

2022-07-29 Thread Benjamin Marzinski
e pathvec (check_id must be less than INT_MAX). Signed-off-by: Benjamin Marzinski --- libmultipath/structs.h | 1 + multipathd/main.c | 79 +- 2 files changed, 63 insertions(+), 17 deletions(-) diff --git a/libmultipath/structs.h b/libmultipath/struct

[dm-devel] [PATCH 2/6] multipathd: track waiters for mutex_lock

2022-07-29 Thread Benjamin Marzinski
use the uatomic operations to track how many threads are waiting in lock() for mutex_locks. This will be used by a later patch. Signed-off-by: Benjamin Marzinski --- libmultipath/lock.h | 16 multipathd/main.c | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff

Re: [dm-devel] [PATCH] multipath-tools: remove list of rebranded arrays vendors from man page

2022-07-25 Thread Benjamin Marzinski
On Thu, Jul 21, 2022 at 07:22:04PM +0200, Xose Vazquez Perez wrote: > It does not provide useful info, and it is incomplete. > Reviewed-by: Benjamin Marzinski > Cc: Martin Wilck > Cc: Benjamin Marzinski > Cc: Christophe Varoqui > Cc: DM-DEVEL ML > Signed-off-b

Re: [dm-devel] [Question] multipathd add/remove paths takes a long time

2022-07-21 Thread Benjamin Marzinski
On Tue, Jul 19, 2022 at 08:13:39PM +0800, Wu Guanghao wrote: > The system has 1K multipath devices, each device has 16 paths. > Execute multipathd add/multipathd remove or uev_add_path/ > uev_remove_path to add/remove paths, which takes over 20s. > What's more, the second checkloop may be execed

Re: [dm-devel] [PATCH v2 08/14] libmultipath: sysfs_attr_set_value(): don't return 0 on partial write

2022-07-15 Thread Benjamin Marzinski
a helper macro for it. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/configure.c | 10 -- > libmultipath/discovery.c | 74 +--- > libmultipath/sysfs.c | 6 ++-- > libmultipath/sysfs.h

[dm-devel] [PATCH] libmultipath: fix find_multipaths_timeout for unknown hardware

2022-07-12 Thread Benjamin Marzinski
pp->hwe is now a vector that will always be allocated for all path devices. Instead of checking if it is NULL, check if it is empty. Signed-off-by: Benjamin Marzinski --- libmultipath/propsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/propsel.

Re: [dm-devel] [PATCH 0/2] update hwtable

2022-07-12 Thread Benjamin Marzinski
On Sun, Jul 10, 2022 at 01:07:07AM +0200, Xose Vazquez Perez wrote: > Xose Vazquez Perez (2): > multipath-tools: update Huawei OceanStor NVMe vendor id > multipath-tools: update "Generic NVMe" vendor regex in hwtable For the set Reviewed-by: Benjamin Marzinski > >

Re: [dm-devel] [PATCH 00/14] multipath: fixes for sysfs accessors

2022-07-12 Thread Benjamin Marzinski
ed. Moreover, the sysfs.c code > is slightly refactored to avoid code duplication. For all except 8/14: Reviewed-by: Benjamin Marzinski > > Martin Wilck (14): > libmultipath: alua: remove get_sysfs_pg83() > libmultipath: remove sysfs_get_binary() > libmultipath: sysf

Re: [dm-devel] [PATCH 08/14] libmultipath: sysfs_attr_set_value(): don't return 0 on partial write

2022-07-12 Thread Benjamin Marzinski
On Wed, Jul 06, 2022 at 04:38:16PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > sysfs_attr_set_value() returned 0 if not all requested bytes were written. > Change this to return the number of bytes written. Error checking is now > somewhat more involved; provide a helper macro fo it.

Re: [dm-devel] [PATCH 05/14] libmultipath: sanitize error checking in sysfs accessors

2022-07-12 Thread Benjamin Marzinski
On Wed, Jul 06, 2022 at 04:38:13PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > udev_device_get_syspath() may return NULL; check for it, and check > for pathname overflow. Disallow a zero buffer length. The fstat() > calls were superfluous, as a read() or write() on the fd would >

[dm-devel] [PATCH] dm: fix possible race in dm_start_io_acct

2022-06-14 Thread Benjamin Marzinski
icate bios. To remove the race, check the flag while holding the io->lock. Fixes: 82f6cdcc3676c ("dm: switch dm_io booleans over to proper flags") Signed-off-by: Benjamin Marzinski --- drivers/md/dm.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/md

Re: [dm-devel] [PATCH] libmultipath: unset detect_checker for clariion / Unity arrays

2022-06-09 Thread Benjamin Marzinski
On Wed, Jun 08, 2022 at 04:47:37PM +, Martin Wilck wrote: > On Wed, 2022-06-08 at 09:40 -0500, Benjamin Marzinski wrote: > > On Wed, Jun 08, 2022 at 07:56:27AM +, Martin Wilck wrote: > > > On Tue, 2022-06-07 at 17:45 -0500, Benjamin Marzinski wrote: > > > >

Re: [dm-devel] [PATCH] multipath-tools: tests: fix hwtable test

2022-06-09 Thread Benjamin Marzinski
On Thu, Jun 09, 2022 at 12:13:55PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > After "libmultipath: hwtable: new defaults for NVMe", we need to fix > the unit tests. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- >

Re: [dm-devel] [PATCH] libmultipath: hwtable: remove ETERNUS AB/HB NVMe

2022-06-09 Thread Benjamin Marzinski
. Fix it. > > Cc: Steven Schremmer > Cc: Xose Vazquez Perez > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/hwtable.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c

Re: [dm-devel] [PATCH] libmultipath, kpartx: fix callers of dm_get_next_target()

2022-06-09 Thread Benjamin Marzinski
rget" by Wu Guanghao. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > kpartx/devmapper.c | 6 -- > libmultipath/devmapper.c | 10 ++ > 2 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/kpartx/devmapper.c b/k

Re: [dm-devel] [RFC PATCH 0/2] multipath-tools: simplify defaults for NVMe

2022-06-08 Thread Benjamin Marzinski
nly > device-specific settings that remain are those for no_path_retry. For the set: Reviewed-by: Benjamin Marzinski > > Martin Wilck (2): > libmultipath: hwtable: new defaults for NVMe > libmultipath: hwtable: remove obsolete NVMe entries > > libmultipath/hwtable.c | 30

Re: [dm-devel] [PATCH] libmultipath: unset detect_checker for clariion / Unity arrays

2022-06-08 Thread Benjamin Marzinski
On Wed, Jun 08, 2022 at 07:56:27AM +, Martin Wilck wrote: > On Tue, 2022-06-07 at 17:45 -0500, Benjamin Marzinski wrote: > > Dell EMC would like to always use the emc_clariion checker. Currently > > detect_checker will switch the checker to TUR for Unity arrays. > > Th

[dm-devel] [PATCH] libmultipath: unset detect_checker for clariion / Unity arrays

2022-06-07 Thread Benjamin Marzinski
...@dell.com Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index 39daadc2..415bf683 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -350,6 +350,7 @@ static struct hwentry

Re: [dm-devel] [PATCH] multipath.conf(5): add disclaimer about vendor support

2022-06-07 Thread Benjamin Marzinski
On Tue, May 31, 2022 at 10:39:05PM +0200, mwi...@suse.com wrote: > From: Martin Wilck Reviewed-by: Benjamin Marzinski > > Add a disclaimer to clarify that entries in the hwtable don't imply any > obligations on the vendor's part. > --- > multipath/multipath.conf.5 | 12

Re: [dm-devel] [PATCH 1/2] libmultipath: hwtable: new defaults for NVMe

2022-06-07 Thread Benjamin Marzinski
On Wed, Jun 01, 2022 at 10:26:27PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > So far we were using the general defaults (pgpolicy = FAILOVER, > pgfailback = -FAILBACK_MANUAL). Xosé's late patches were setting this to > either MULTIBUS or ANA, and -FAILBACK_IMMEDIATE, respectively >

Re: [dm-devel] [PATCH 4/9] multipath-tools: add NetApp E-Series NVMe to hardware table

2022-05-31 Thread Benjamin Marzinski
On Tue, May 31, 2022 at 10:43:01AM +0200, Martin Wilck wrote: > Hi Steve, > > On Thu, 2022-05-26 at 20:10 +, Schremmer, Steven wrote: > > > From: Martin Wilck > > > Sent: Thursday, May 19, 2022 9:47 AM > > > Hi Steve, > > > > > > On Thu, 2022-05-19 at 13:18 +, Schremmer, Steven wrote: >

Re: [dm-devel] [PATCH]dm_get_map: fix segfault when can't found target

2022-05-27 Thread Benjamin Marzinski
} > 691 > 692 out: > (gdb) p params > $1 = 0x0 > > If can't found target, we should goto out > > Signed-off-by: Wu Guanghao Reviewed-by: Benjamin Marzinski > --- > libmultipath/devmapper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [dm-devel] [PATCH 0/9] add new devices to hw table

2022-05-17 Thread Benjamin Marzinski
FlashArray NVMe to hardware table > multipath-tools: add Dell EMC PowerStore NVMe to hardware table For the set: Reviewed-by: Benjamin Marzinski > > README.md | 2 +- > libmultipath/checkers/rdac.c| 2 +- > libmultipath/hwtable.c | 60 +++

Re: [dm-devel] [PATCH] multipath-tools: Makefile.inc: add test for -D_FORTIFY_SOURCE=3

2022-05-09 Thread Benjamin Marzinski
On Mon, May 09, 2022 at 05:21:27PM +0200, mwi...@suse.com wrote: > From: Martin Wilck Reviewed-by: Benjamin Marzinski > > 6186645 ("Fix possibility to redefine -D_FORTIFY_SOURCE macro.") > does not work as-is, because OPTFLAGS can't be used to override CPPFLAGS.

Re: [dm-devel] [PATCH 0/7] multipath-tools: fix unit test breakage

2022-05-05 Thread Benjamin Marzinski
) > and because the hwtable test relied on being able to the retrieve > the now removed "getuid_callout" property from config files. > > Fix it. As always, comments welcome. For the set, Reviewed-by: Benjamin Marzinski > > Regards > Martin > > Martin Wilck (

Re: [dm-devel] [PATCH] update HPE MSA builtin config

2022-05-02 Thread Benjamin Marzinski
On Mon, May 02, 2022 at 11:01:40AM -0500, Benjamin Marzinski wrote: > On Mon, May 02, 2022 at 10:31:36AM +, Martin Wilck wrote: > > On Fri, 2022-04-29 at 17:09 -0500, Benjamin Marzinski wrote: > > > Make the config better align to MSA 4th, 5th and 6th Genera

Re: [dm-devel] [PATCH] update HPE MSA builtin config

2022-05-02 Thread Benjamin Marzinski
On Mon, May 02, 2022 at 10:31:36AM +, Martin Wilck wrote: > On Fri, 2022-04-29 at 17:09 -0500, Benjamin Marzinski wrote: > > Make the config better align to MSA 4th, 5th and 6th Generation > > systems. > > > > Suggested-by: Jon Paul > >

Re: [dm-devel] [PATCH] multipath-tools: prevent a kernel upgrade leading to all paths lost

2022-04-29 Thread Benjamin Marzinski
On Mon, Apr 18, 2022 at 02:54:15PM -0700, Brian Bunker wrote: > With the kernel commit 268940b80fa4096397fd0a28e6ad807e64120215, the > handling of ALUA state transitioning state changed. It used to be that > paths which returned with ALUA transitioning state would not result in > those paths being

[dm-devel] [PATCH] update HPE MSA builtin config

2022-04-29 Thread Benjamin Marzinski
Make the config better align to MSA 4th, 5th and 6th Generation systems. Suggested-by: Jon Paul Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index 0e1c0a41

Re: [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options

2022-04-14 Thread Benjamin Marzinski
On Thu, Apr 14, 2022 at 03:18:04PM +0200, mwi...@suse.com wrote: For the set: Reviewed-by: Benjamin Marzinski -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] libmultipath: use symbolic value for invalid pcentry

2022-04-14 Thread Benjamin Marzinski
Suggested-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 4 ++-- libmultipath/config.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libmultipath/config.c b/libmultipath/config.c index c3cfa119..54c28d24 100644 --- a/libmultipath/config.c

[dm-devel] [PATCH v2 6/7] libmultipath: fix eh_deadline documentation

2022-04-13 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 4 1 file changed, 4 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 605b46e0..97695da4 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1636,6 +1636,8

[dm-devel] [PATCH v2 7/7] libmultipath: Add documentation for the protocol subsection

2022-04-13 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 32 1 file changed, 32 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 97695da4..198a79dd 100644 --- a/multipath/multipath.conf.5 +++ b/multipath

[dm-devel] [PATCH v2 3/7] libmultipath: add a protocol subsection to multipath.conf

2022-04-13 Thread Benjamin Marzinski
select path-specific options to be set. This commit simply adds the subsection, and handles merging matching entries. Future patches will make use of the section. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 83 libmultipath/config.h | 10

[dm-devel] [PATCH v2 4/7] libmultipath: Set the scsi timeout parameters by path

2022-04-13 Thread Benjamin Marzinski
they will all be the same, but a future patch will make it possible for paths to have different values based on their protocol. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 5 +- libmultipath/discovery.c | 174 ++- libmultipath/discovery.h | 2

[dm-devel] [PATCH v2 5/7] libmultipath: check the overrides pctable for path variables

2022-04-13 Thread Benjamin Marzinski
Paths will now also check the pctable when checking for attribtes that exists in both the overrides section and the protocol subsection. Values in a matching pcentry will be used in preference to values in the overrides hwentry. Signed-off-by: Benjamin Marzinski --- libmultipath/propsel.c | 29

[dm-devel] [PATCH v2 2/7] libmultipath: make protocol_name global

2022-04-13 Thread Benjamin Marzinski
Future patches will make use of this, so move it out of snprint_path_protocol() Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/print.c | 17 - libmultipath/structs.c | 18 ++ libmultipath/structs.h | 1 + 3 files changed, 19

[dm-devel] [PATCH v2 1/7] libmultipath: steal the src string pointer in merge_str()

2022-04-13 Thread Benjamin Marzinski
Instead of allocating a copy when the original string is going to be freed right after the merge, just steal the pointer. Also, merge_mpe() can't get called with NULL arguments. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/config.c | 16 +--- 1 file

[dm-devel] [PATCH v2 0/7] Add protocol specific config subsection

2022-04-13 Thread Benjamin Marzinski
) modified the man page to no longer reference the protocol subsection under the device subsection Benjamin Marzinski (7): libmultipath: steal the src string pointer in merge_str() libmultipath: make protocol_name global libmultipath: add a protocol subsection to multipath.conf

Re: [dm-devel] [PATCH 0/9] Add protocol specific config subsection

2022-04-12 Thread Benjamin Marzinski
On Tue, Apr 12, 2022 at 08:47:38PM +, Martin Wilck wrote: > On Tue, 2022-04-12 at 13:47 -0500, Benjamin Marzinski wrote: > > On Tue, Apr 12, 2022 at 10:31:50AM +, Martin Wilck wrote: > > > > > I agree that setting fast_io_fail_tmo to different values bas

Re: [dm-devel] [PATCH 0/9] Add protocol specific config subsection

2022-04-12 Thread Benjamin Marzinski
On Tue, Apr 12, 2022 at 10:31:50AM +, Martin Wilck wrote: > On Mon, 2022-04-11 at 20:59 -0500, Benjamin Marzinski wrote: > > Some storage arrays can be accessed using multiple protocols at the > > same > > time.  I've have customers request the ability to set

[dm-devel] [PATCH 9/9] libmultipath: Add documentation for the protocol subsection

2022-04-11 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 38 ++ 1 file changed, 38 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 97695da4..dab1d58f 100644 --- a/multipath/multipath.conf.5 +++ b/multipath

[dm-devel] [PATCH 8/9] libmultipath: fix eh_deadline documentation

2022-04-11 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 4 1 file changed, 4 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 605b46e0..97695da4 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1636,6 +1636,8

[dm-devel] [PATCH 7/9] libmultipath: add procotol subsection to overrides

2022-04-11 Thread Benjamin Marzinski
Add a procotol subsection to the overrides section, just like the one in the device subsection. This allows users to a protocol specific parameters to all device configurations. Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c| 76

[dm-devel] [PATCH 3/9] libmultipath: add a protocol subsection to multipath.conf

2022-04-11 Thread Benjamin Marzinski
select path-specific options to be set. This commit simply adds the subsection, and handles merging matching entries, both within a hwentry, and when hwentries are merged. Future patches will make use of the section. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 102

[dm-devel] [PATCH 5/9] libmultipath: check the hwentry pctable for path variables

2022-04-11 Thread Benjamin Marzinski
For the config values that exist in the proctol subsection of the device configs, paths will now also check the pctable when checking a hwentry for a value. Values in a matching pcentry will be used in preference to values in that hwentry. Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH 6/9] libmultipath: make snprint_pctable indent a variable amount

2022-04-11 Thread Benjamin Marzinski
Instead of always indenting two tabs, which is what is needed in for the protocol subsection of the device subsection, indent a variable amount. This will be needed in a future patch. Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 28 +--- 1 file changed

[dm-devel] [PATCH 2/9] libmultipath: make protocol_name global

2022-04-11 Thread Benjamin Marzinski
Future patches will make use of this, so move it out of snprint_path_protocol() Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 17 - libmultipath/structs.c | 18 ++ libmultipath/structs.h | 1 + 3 files changed, 19 insertions(+), 17 deletions

[dm-devel] [PATCH 1/9] libmultipath: steal the src string pointer in merge_str()

2022-04-11 Thread Benjamin Marzinski
Instead of allocating a copy when the original string is going to be freed right after the merge, just steal the pointer. Also, merge_mpe() can't get called with NULL arguments. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 16 +--- 1 file changed, 5 insertions

[dm-devel] [PATCH 4/9] libmultipath: Set the scsi timeout parameters by path

2022-04-11 Thread Benjamin Marzinski
they will all be the same, but a future patch will make it possible for paths to have different values based on their protocol. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 5 +- libmultipath/discovery.c | 174 ++- libmultipath/discovery.h | 2

[dm-devel] [PATCH 0/9] Add protocol specific config subsection

2022-04-11 Thread Benjamin Marzinski
a new protocol subsection to the device subsection and the overrides section. This allows users to set a device config's path specific timeouts, such as dev_loss_tmo, fast_io_fail_tmo, and eh_deadline on a per-protocol basis. Benjamin Marzinski (9): libmultipath: steal the src string pointer

Re: [dm-devel] [PATCH v2 15/15] libmultipath: avoid memory leak with uid_attrs

2022-04-04 Thread Benjamin Marzinski
On Mon, Apr 04, 2022 at 07:04:57PM +0200, mwi...@suse.com wrote: > Free all vector elements when freeing uid_attrs. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/config.c | 5 + > libmultipath/dict.c | 5 + > 2 files c

Re: [dm-devel] [PATCH v2 14/15] libmultipath: apply_format(): prevent buffer overflow

2022-04-04 Thread Benjamin Marzinski
On Mon, Apr 04, 2022 at 07:04:56PM +0200, mwi...@suse.com wrote: > Potential overflow found by coverity (CID 376918). Reviewed-by: Benjamin Marzinski > --- > libmultipath/callout.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libmultipath/callou

Re: [dm-devel] [PATCH v2 05/15] multipathd: reconfigure: disallow changing uid_attrs

2022-04-04 Thread Benjamin Marzinski
ilck Reviewed-by: Benjamin Marzinski > --- > multipath/multipath.conf.5 | 2 ++ > multipathd/main.c | 59 -- > 2 files changed, 52 insertions(+), 9 deletions(-) > > diff --git a/multipath/multipath.conf.5 b/multipath/multipat

Re: [dm-devel] [PATCH v2 00/15] Rework uevent filtering and merging

2022-04-04 Thread Benjamin Marzinski
On Mon, Apr 04, 2022 at 07:04:42PM +0200, mwi...@suse.com wrote: FYI, these are still not coming through as plain-text messages. See https://listman.redhat.com/archives/dm-devel/2022-April/050155.html -Ben -- dm-devel mailing list dm-devel@redhat.com

Re: [dm-devel] [PATCH 00/14] Rework uevent filtering and merging

2022-04-01 Thread Benjamin Marzinski
own testing, > but I'd appreciate if ZTE could give it a shot in their special test > environment. > > Patch 9-14 add some more improvements to the uevent handling code, and > improve logging. The first 2 patches are unrelated fixes. > > Comments welcome, > > Mart

Re: [dm-devel] [PATCH 12/14] libmultipath: uevent_filter(): filter previously merged events

2022-04-01 Thread Benjamin Marzinski
;action, > earlier->kernel, > + later->action, later->kernel); > + uevent_delete_from_list(mn, , NULL); Just like with 05/14, you could just use a much simpler delete function

Re: [dm-devel] [PATCH 06/14] multipathd: reconfigure: disallow changing uid_attrs

2022-04-01 Thread Benjamin Marzinski
> On Thu, Mar 31, 2022 at 12:15:02AM +0200, mwi...@suse.com wrote: > uevent merging by WWID relies on the uid_attrs config option. As we > drop struct config between calls to uevent_merge(), we must be sure > that the WWID is not changed in reconfigure(). > > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 05/14] libmultipath: uevent_dispatch(): only filter/merge new uevents

2022-04-01 Thread Benjamin Marzinski
> On Thu, Mar 31, 2022 at 12:15:01AM +0200, mwi...@suse.com wrote: > When uevq_work is non-empty and we append a list of new events, > we don't need to check the entire list for filterable and mergeable > uevents. uevq_work had been filtered and merged already. So we just > need to check the newly

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