Re: [dm-devel] [PATCH v2] multipathd: fix client response for socket activation

2019-05-15 Thread Benjamin Marzinski
d have > a means to "know" which commands require the configuration stage to > complete and which do not. > > v2: Removed an unrelated, unnecessary hunk in child(). Reviewed-by: Benjamin Marzinski > > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 27

Re: [dm-devel] [PATCH v2] multipath -u: test socket connection in non-blocking mode

2019-05-15 Thread Benjamin Marzinski
On Thu, Apr 25, 2019 at 09:33:03PM +0200, Martin Wilck wrote: > On Wed, 2019-04-24 at 11:07 +0200, Martin Wilck wrote: > > Since commit d7188fcd "multipathd: start daemon after udev trigger", > > multipathd startup is delayed during boot until after "udev settle" > > terminates. But "multipath -u"

Re: [dm-devel] [PATCH] libmultipath: get_prio(): really don't reset prio for inaccessible paths

2019-05-16 Thread Benjamin Marzinski
On Thu, May 16, 2019 at 09:10:24AM +0200, Martin Wilck wrote: > As pointed out by Ben Marzinski, my previous patch ebbb56f2 doesn't do what > it pretends to do. > > Fixes: ebbb56f2 "libmultipath: get_prio(): don't reset prio for inaccessible > paths&quo

Re: [dm-devel] [PATCH v2] multipath -u: test socket connection in non-blocking mode

2019-05-16 Thread Benjamin Marzinski
On Thu, May 16, 2019 at 08:44:56AM +0200, Martin Wilck wrote: > On Mon, 2019-04-29 at 16:38 -0500, Benjamin Marzinski wrote: > > On Thu, Apr 25, 2019 at 09:33:03PM +0200, Martin Wilck wrote: > > > > > > @Ben, I'd be grateful if you could try it (or have the user tr

[dm-devel] [PATCH 0/4] Coverity fixes

2019-05-17 Thread Benjamin Marzinski
These are fixes to some issues that coverity pointed out. Benjamin Marzinski (4): libmultipath: handle clock_gettime failures in tur checker kpartx: fail if dup() of dasd file descriptor fails multipathd: fix REALLOC_REPLY with max length reply multipathd: handle NULL return from

[dm-devel] [PATCH 1/4] libmultipath: handle clock_gettime failures in tur checker

2019-05-17 Thread Benjamin Marzinski
If clock_gettime() fails, and multipathd can't figure out when it should time out, it should just default to assuming that it has already timed out. Found by coverity. Signed-off-by: Benjamin Marzinski --- libmultipath/checkers/tur.c | 19 +++ 1 file changed, 15 insertions(

[dm-devel] [PATCH 2/4] kpartx: fail if dup() of dasd file descriptor fails

2019-05-17 Thread Benjamin Marzinski
If kpartx fails to create a copy of the dasd file descriptor, it should fail, instead of treating the error value as a valid fd. Found by coverity. Signed-off-by: Benjamin Marzinski --- kpartx/dasd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kpartx/dasd.c b/kpartx/dasd.c index

[dm-devel] [PATCH 4/4] multipathd: handle NULL return from genhelp_handler

2019-05-17 Thread Benjamin Marzinski
parse_cmd() wasn't checking if genhelp_handler() returned NULL. It was simply assuming that it got a string. On NULL, it now returns an error. Found by Coverity. Signed-off-by: Benjamin Marzinski --- multipathd/cli.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --

[dm-devel] [PATCH 3/4] multipathd: fix REALLOC_REPLY with max length reply

2019-05-17 Thread Benjamin Marzinski
Fixes: cd5a9797e "libmpathcmd(coverity): limit reply length" Signed-off-by: Benjamin Marzinski --- multipathd/cli.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/multipathd/cli.h b/multipathd/cli.h index f3fa077a..32dcffac 100644 --- a/multipathd/cli.h +

Re: [dm-devel] [PATCH 1/4] libmultipath: handle clock_gettime failures in tur checker

2019-05-20 Thread Benjamin Marzinski
On Fri, May 17, 2019 at 11:55:48PM +0200, Martin Wilck wrote: > On Fri, 2019-05-17 at 11:14 -0500, Benjamin Marzinski wrote: > > If clock_gettime() fails, and multipathd can't figure out when it > > should > > time out, it should just default to assuming that it has

Re: [dm-devel] [RFC PATCH 2/7] mpathpersist: add option --batch-file (-f)

2019-05-22 Thread Benjamin Marzinski
On Sat, May 18, 2019 at 12:56:58AM +0200, Martin Wilck wrote: > Add the option --batch-file (-f) to mpathpersist. The option argument > is a text file that is parsed line-by-line. Every line of the file is > interpreted as an additional input line for mpathpersist. The initial > "mpathpersist" on e

Re: [dm-devel] [RFC PATCH 2/7] mpathpersist: add option --batch-file (-f)

2019-05-22 Thread Benjamin Marzinski
On Sat, May 18, 2019 at 12:56:58AM +0200, Martin Wilck wrote: > Add the option --batch-file (-f) to mpathpersist. The option argument > is a text file that is parsed line-by-line. Every line of the file is > interpreted as an additional input line for mpathpersist. The initial > "mpathpersist" on e

Re: [dm-devel] [RFC PATCH 2/7] mpathpersist: add option --batch-file (-f)

2019-05-22 Thread Benjamin Marzinski
On Sat, May 18, 2019 at 12:56:58AM +0200, Martin Wilck wrote: > Add the option --batch-file (-f) to mpathpersist. The option argument > is a text file that is parsed line-by-line. Every line of the file is > interpreted as an additional input line for mpathpersist. The initial > "mpathpersist" on e

[dm-devel] [PATCH] libmultipath: make vector_foreach_slot_backwards work as expected

2019-05-24 Thread Benjamin Marzinski
All of the code that uses vector_foreach_slot_backwards() treats "i" as the index of the entry "p", but the way it was coded, that wasn't the case. "i" was the number of the entry counting from 1, not 0. Signed-off-by: Benjamin Marzinski --- libmultipath

Re: [dm-devel] [PATCH] libmultipath: make vector_foreach_slot_backwards work as expected

2019-05-28 Thread Benjamin Marzinski
On Mon, May 27, 2019 at 12:03:59PM +0200, Martin Wilck wrote: > On Fri, 2019-05-24 at 17:41 -0500, Benjamin Marzinski wrote: > > All of the code that uses vector_foreach_slot_backwards() treats "i" > > as > > the index of the entry "p", but the way it was

Re: [dm-devel] [PATCH v2 0/9] speeding up mpathpersist

2019-05-29 Thread Benjamin Marzinski
On Mon, May 27, 2019 at 02:59:33PM +0200, Martin Wilck wrote: > We've had reports that mpathpersist doesn't scale well in environments > with lots of IO devices. This patch set tries to address this problem > with a few optimizations: > > - instead of doing a full path discovery at startup, only

[dm-devel] [PATCH] multipath: call store_pathinfo with DI_BLACKLIST

2019-06-03 Thread Benjamin Marzinski
pathd add path will add a blacklisted path. Fixes: ca19f865f "libmultipath: add 'cmd' as argument for get_refwwid()" Cc: Hannes Reinecke Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 3 ++- multipathd/cli_handlers.c | 2 +- 2 files changed, 3 insertions

Re: [dm-devel] [PATCH 05/30] multipath-tools: fix more gcc 9 -Wstringop-truncation warnings

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:27PM +0200, Martin Wilck wrote: > More often than not, this means replacing strncpy() by strlcpy(). This depends on "libmultipath: add size argument to dm_get_uuid()" for the the extra argument in the call to dm_get_uuid() from get_refwwid(). Otherwise, it looks fine.

Re: [dm-devel] [PATCH 07/30] libmpathcmd: use target length in strncpy() call

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:29PM +0200, Martin Wilck wrote: Not a big deal since default socket is a defined string, but since we are writing to &addr.sun_path[1], if DEFAULT_SOCKET were of size >= "sizeof(addr.sun_path) - 1", the strncpy() would fill all of addr.sun_path, without leaving any sp

Re: [dm-devel] [PATCH 00/30] multipath-tools: gcc9, VPD parsing, and get_uid fixes

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:22PM +0200, Martin Wilck wrote: > Hi Christophe, hi Ben, ACK for everything, except my nitpicks for patches 5 and 7. I don't know how much we care about patch 5 temporarily breaking compilation, but it no one else is bothered by it, I would be fine with simply tacking

Re: [dm-devel] [PATCH v2 00/30] multipath-tools: gcc9, VPD parsing, and get_uid fixes

2019-06-25 Thread Benjamin Marzinski
On Mon, Jun 24, 2019 at 11:27:25AM +0200, Martin Wilck wrote: > Hi Christophe, hi Ben, > Reviewed-by: Benjamin Marzinski for the set > This series started out with me trying to fix a couple of warnings > emitted by gcc 9, and grew substantially while I encountered other >

Re: [dm-devel] [PATCH] kpartx: recognize DASD on loop devices again

2019-07-08 Thread Benjamin Marzinski
s again. > > Fixes: 4d57b868 "kpartx: only recognize dasd part table on DASD" Reviewed-by: Benjamin Marzinski > --- > kpartx/dasd.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/kpartx/dasd.c b/kpartx/dasd.c > index 6

[dm-devel] [PATCH 04/16] libmultipath: add wrapper function around pgpolicyfn

2019-08-02 Thread Benjamin Marzinski
are now needlessly sorted afterwards. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 2 +- libmultipath/pgpolicies.c | 65 +-- libmultipath/pgpolicies.h | 2 +- 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/libmultipath/con

[dm-devel] [PATCH 05/16] libmultipath: fix double free in pgpolicyfn error paths

2019-08-02 Thread Benjamin Marzinski
device, calling free_pgvec() will clean it up. In this case, if free_pathgroup() is called first, the recently added pathgroup will be freed twice. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a

[dm-devel] [PATCH 07/16] libmultipath: make one_group allocate a new vector

2019-08-02 Thread Benjamin Marzinski
All the pgpolicy functions besides one_group() allocate a new vector for the pathgroups. If one_group() works the same, it is easier to factor out the common code. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 22 +++--- 1 file changed, 11 insertions(+), 11

[dm-devel] [PATCH 00/16] multipath marginal pathgroups

2019-08-02 Thread Benjamin Marzinski
marginal paths when all other paths have failed. https://www.mail-archive.com/dm-devel@redhat.com/msg12956.html Benjamin Marzinski (16): libmultipath: make vector_foreach_slot_backwards work as expected libmultipath: add marginal paths and groups infrastructure tests: add path grouping po

[dm-devel] [PATCH 01/16] libmultipath: make vector_foreach_slot_backwards work as expected

2019-08-02 Thread Benjamin Marzinski
All of the code that uses vector_foreach_slot_backwards() treats "i" as the index of the entry "p", but the way it was coded, that wasn't the case. "i" was the number of the entry counting from 1, not 0. Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH 10/16] libmultipath: make pgpolicyfn take a paths vector

2019-08-02 Thread Benjamin Marzinski
To enable future changes, mp->pgpolicyfn() now takes a vector of paths instead of always using mp->paths. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 38 +++--- libmultipath/pgpolicies.h | 10 +- libmultipath/structs.h| 2

[dm-devel] [PATCH 14/16] libmutipath: deprecate delay_*_checks

2019-08-02 Thread Benjamin Marzinski
specific time. This patch deprecates the delay_checks method and maps it to the the san_path_err method. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 17 +-- libmultipath/propsel.c | 62 +- libmultipath/propsel.h | 2

[dm-devel] [PATCH 02/16] libmultipath: add marginal paths and groups infrastructure

2019-08-02 Thread Benjamin Marzinski
Currently, the marginal variable of a pathgroup will not change. This will be added by a future commit. The marginal state of a path or pathgroup is printable with the %M wildcard, and is displayed in the json output. Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 18

[dm-devel] [PATCH 16/16] multipath: update man pages

2019-08-02 Thread Benjamin Marzinski
Add documentation for the marginal_pathgroups option and the (un)setmarginal commands. Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 34 ++ multipathd/multipathd.8| 19 +++ 2 files changed, 49 insertions(+), 4 deletions

[dm-devel] [PATCH 03/16] tests: add path grouping policy unit tests.

2019-08-02 Thread Benjamin Marzinski
_group() should as well. This will be fixed when the path grouping code is updated. Signed-off-by: Benjamin Marzinski --- tests/Makefile | 2 +- tests/pgpolicy.c | 708 +++ 2 files changed, 709 insertions(+), 1 deletion(-) create mode 100644 tests/pgpo

[dm-devel] [PATCH 13/16] libmultipath: add marginal_pathgroups config option

2019-08-02 Thread Benjamin Marzinski
group_paths now gets passed this to determine whether to enable marginal pathgroups. The unit tests have also been updated. Signed-off-by: Benjamin Marzinski --- libmultipath/config.h | 1 + libmultipath/configure.c | 5 +- libmultipath/dict.c | 3 + libmultipath/pgpolicies.c

[dm-devel] [PATCH 06/16] libmultipath: remove store_pathgroup

2019-08-02 Thread Benjamin Marzinski
store_pathgroup() is only called by add_pathgroup(), and doesn't need to exist as a seperate function. Signed-off-by: Benjamin Marzinski --- libmultipath/structs.c | 16 +++- libmultipath/structs.h | 1 - 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/libmult

[dm-devel] [PATCH 09/16] tests: update pgpolicy tests to work with group_paths()

2019-08-02 Thread Benjamin Marzinski
The pgpolicy unit tests now work again, using group_paths(). test_one_group0(), which was skipped with the old path grouping code because it failed, is now working correctly. Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 125 +++ 1 file

[dm-devel] [PATCH 08/16] libmultipath: consolidate group_by_* functions

2019-08-02 Thread Benjamin Marzinski
is no need to sort the pathgroups in group_by_prio(). This means that all three functions can be replaced with one function, group_by_match() that takes a match function as an argument. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 189 +- 1

[dm-devel] [PATCH 11/16] libmultipath: make group_paths handle marginal paths

2019-08-02 Thread Benjamin Marzinski
group_paths() will now create seperate path groups for marginal and normal paths, and place all of the marginal path groups after the normal ones, in order by priority. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 83 +- libmultipath

[dm-devel] [PATCH 12/16] tests: add tests for grouping marginal paths.

2019-08-02 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 337 +-- 1 file changed, 295 insertions(+), 42 deletions(-) diff --git a/tests/pgpolicy.c b/tests/pgpolicy.c index 04a77c4c..ab09f91c 100644 --- a/tests/pgpolicy.c +++ b/tests/pgpolicy.c

[dm-devel] [PATCH 15/16] multipathd: use marginal_pathgroups

2019-08-02 Thread Benjamin Marzinski
uot; instead of "shaky" like it previously did. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 53 +-- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index dca2214c..04b2b56a 10064

Re: [dm-devel] [PATCH] libmultipath: trigger uevents for partitions, too

2019-08-05 Thread Benjamin Marzinski
h: trigger change uevent on new device creation > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/configure.c | 38 ++ > 1 file changed, 38 insertions(+) > > diff --git a/libmultipath/configure.c b/libmultipa

Re: [dm-devel] [PATCH] multipath-tools: reorder NVDISK devices

2019-08-14 Thread Benjamin Marzinski
On Thu, Aug 01, 2019 at 07:21:38PM +0200, Xose Vazquez Perez wrote: > Otherwise "3303[ ]+NVDISK" is never reached, because "NVDISK" regex takes > priority over it. Huh? I don't understand why this is necessary. First off, with Martin's hwentry code, all matching hardware entries are used, not just

[dm-devel] [PATCH] multipath: add print_foreign option

2019-08-14 Thread Benjamin Marzinski
This adds a print_foreign multipath.conf defaults option, that allows users to disable printing foreign devices and paths. It defaults to "yes". Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 1 + libmultipath/config.h | 1 + libmultipath/defaults

[dm-devel] [PATCH] libmultipath: builtin config for NetApp E-Series

2019-08-14 Thread Benjamin Marzinski
Cc: Steve Schremmer Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 8 1 file changed, 8 insertions(+) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index 96e8b25d..94af153d 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -780,6

Re: [dm-devel] [PATCH 1/2] multipath.conf: add "enable_foreign" parameter

2019-08-16 Thread Benjamin Marzinski
On Thu, Aug 15, 2019 at 02:46:54PM +, Martin Wilck wrote: > From: Martin Wilck > > This new configuration parameter can be used to selectively > enable foreign libraries. The value is a regular expression, > against which foreign library names such as "nvme" are matched. > By setting this to

Re: [dm-devel] [PATCH 14/16] libmutipath: deprecate delay_*_checks

2019-08-16 Thread Benjamin Marzinski
On Wed, Aug 14, 2019 at 09:20:46PM +, Martin Wilck wrote: > On Fri, 2019-08-02 at 11:33 -0500, Benjamin Marzinski wrote: > > The delay_checks shaky paths detection method works the same way as > > the > > san_path_err method, but not as well, with less configurability,

Re: [dm-devel] [PATCH 16/16] multipath: update man pages

2019-08-16 Thread Benjamin Marzinski
On Wed, Aug 14, 2019 at 09:21:32PM +, Martin Wilck wrote: > On Fri, 2019-08-02 at 11:33 -0500, Benjamin Marzinski wrote: > > Add documentation for the marginal_pathgroups option and the > > (un)setmarginal commands. > > > > Signed-off-by: Benjamin Marzin

Re: [dm-devel] [PATCH 03/16] tests: add path grouping policy unit tests.

2019-08-16 Thread Benjamin Marzinski
On Wed, Aug 14, 2019 at 09:22:17PM +, Martin Wilck wrote: > On Fri, 2019-08-02 at 11:33 -0500, Benjamin Marzinski wrote: > > In preparation for changing the path grouping code, add some unit > > tests > > to verify that it works correctly. The only test that currently

Re: [dm-devel] [PATCH 04/16] libmultipath: add wrapper function around pgpolicyfn

2019-08-16 Thread Benjamin Marzinski
On Wed, Aug 14, 2019 at 09:39:27PM +, Martin Wilck wrote: > On Fri, 2019-08-02 at 11:33 -0500, Benjamin Marzinski wrote: > > group_paths() is a wrapper around the pgpolicy functions, that pulls > > out > > the common code from the beginning and the end. However since &

Re: [dm-devel] [PATCH 10/16] libmultipath: make pgpolicyfn take a paths vector

2019-08-16 Thread Benjamin Marzinski
On Wed, Aug 14, 2019 at 10:05:45PM +, Martin Wilck wrote: > On Fri, 2019-08-02 at 11:33 -0500, Benjamin Marzinski wrote: > > To enable future changes, mp->pgpolicyfn() now takes a vector of > > paths instead of always using mp->paths. > > > >

Re: [dm-devel] [PATCH 1/2] multipath.conf: add "enable_foreign" parameter

2019-08-20 Thread Benjamin Marzinski
On Tue, Aug 20, 2019 at 04:24:58PM +, Martin Wilck wrote: > On Mon, 2019-08-19 at 20:32 +, Martin Wilck wrote: > > On Fri, 2019-08-16 at 15:12 -0500, Benjamin Marzinski wrote: > > > On Thu, Aug 15, 2019 at 02:46:54PM +, Martin Wilck wrote: > >

Re: [dm-devel] [PATCH 10/16] libmultipath: make pgpolicyfn take a paths vector

2019-08-20 Thread Benjamin Marzinski
On Fri, Aug 16, 2019 at 04:28:37PM -0500, Benjamin Marzinski wrote: > On Wed, Aug 14, 2019 at 10:05:45PM +, Martin Wilck wrote: > > OK: This is future material. But if we take this patch and its > > successors, be'd have it cast in stone that "marginal/normal&quo

[dm-devel] [PATCH v2 10/14] tests: add tests for grouping marginal paths.

2019-08-23 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 337 +-- 1 file changed, 295 insertions(+), 42 deletions(-) diff --git a/tests/pgpolicy.c b/tests/pgpolicy.c index 04a77c4c..ab09f91c 100644 --- a/tests/pgpolicy.c +++ b/tests/pgpolicy.c

[dm-devel] [PATCH v2 08/14] libmultipath: make pgpolicyfn take a paths vector

2019-08-23 Thread Benjamin Marzinski
To enable future changes, mp->pgpolicyfn() now takes a vector of paths instead of always using mp->paths. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 38 +++--- libmultipath/pgpolicies.h | 10 +- libmultipath/structs.h| 2

[dm-devel] [PATCH v2 13/14] multipathd: use marginal_pathgroups

2019-08-23 Thread Benjamin Marzinski
uot; instead of "shaky" like it previously did. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 53 +-- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index dca2214c..04b2b56a 10064

[dm-devel] [PATCH v2 07/14] libmultipath: consolidate group_by_* functions

2019-08-23 Thread Benjamin Marzinski
is no need to sort the pathgroups in group_by_prio(). This means that all three functions can be replaced with one function, group_by_match() that takes a match function as an argument. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 189

[dm-devel] [PATCH v2 04/14] libmultipath: add wrapper function around pgpolicyfn

2019-08-23 Thread Benjamin Marzinski
group_by_prio are now needlessly sorted afterwards. That will be dealt with in a later patch. Also, since store_pathgroup() is only called by add_pathgroup(), it doesn't need to exist as a seperate function. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c

[dm-devel] [PATCH v2 01/14] libmultipath: make vector_foreach_slot_backwards work as expected

2019-08-23 Thread Benjamin Marzinski
All of the code that uses vector_foreach_slot_backwards() treats "i" as the index of the entry "p", but the way it was coded, that wasn't the case. "i" was the number of the entry counting from 1, not 0. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzin

[dm-devel] [PATCH v2 00/14] multipath marginal pathgroups

2019-08-23 Thread Benjamin Marzinski
lue. - patch 12/14 (old patch 14/16) changes how delay_checks is selected, to ignore the delay_checks values if any san_path_err options are set, based on Martin's suggestions. It also changes the man page wording. Benjamin Marzinski (14): libmultipath: make vector_foreach_slot_bac

[dm-devel] [PATCH v2 02/14] libmultipath: add marginal paths and groups infrastructure

2019-08-23 Thread Benjamin Marzinski
Currently, the marginal variable of a pathgroup will not change. This will be added by a future commit. The marginal state of a path or pathgroup is printable with the %M wildcard, and is displayed in the json output. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH v2 14/14] multipath: update man pages

2019-08-23 Thread Benjamin Marzinski
Add documentation for the marginal_pathgroups option and the (un)setmarginal commands. Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 34 ++ multipathd/multipathd.8| 19 +++ 2 files changed, 49 insertions(+), 4 deletions

[dm-devel] [PATCH v2 11/14] libmultipath: add marginal_pathgroups config option

2019-08-23 Thread Benjamin Marzinski
group_paths now gets passed this to determine whether to enable marginal pathgroups. The unit tests have also been updated. Signed-off-by: Benjamin Marzinski --- libmultipath/config.h | 1 + libmultipath/configure.c | 5 +- libmultipath/dict.c | 3 + libmultipath/pgpolicies.c

[dm-devel] [PATCH v2 05/14] tests: update pgpolicy tests to work with group_paths()

2019-08-23 Thread Benjamin Marzinski
The pgpolicy unit tests now work again, using group_paths(). test_one_group0(), which was skipped with the old path grouping code because it failed, is now working correctly. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 125

[dm-devel] [PATCH v2 03/14] tests: add path grouping policy unit tests.

2019-08-23 Thread Benjamin Marzinski
_group() should as well. This will be fixed when the path grouping code is updated. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- tests/Makefile | 2 +- tests/pgpolicy.c | 708 +++ 2 files changed, 709 insertions(+), 1 deletion(-)

[dm-devel] [PATCH v2 06/14] libmultipath: fix double free in pgpolicyfn error paths

2019-08-23 Thread Benjamin Marzinski
device, calling free_pgvec() will clean it up. In this case, if free_pathgroup() is called first, the recently added pathgroup will be freed twice. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[dm-devel] [PATCH v2 09/14] libmultipath: make group_paths handle marginal paths

2019-08-23 Thread Benjamin Marzinski
group_paths() will now create seperate path groups for marginal and normal paths, and place all of the marginal path groups after the normal ones, in order by priority. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 83 +- libmultipath

[dm-devel] [PATCH v2 12/14] libmutipath: deprecate delay_*_checks

2019-08-23 Thread Benjamin Marzinski
specific time. This patch deprecates the delay_checks method and maps it to the the san_path_err method. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 18 +--- libmultipath/propsel.c | 89 -- libmultipath/propsel.h | 3

Re: [dm-devel] [PATCH] multipathd: "san_path_err" failure optimization

2019-09-03 Thread Benjamin Marzinski
change from up to down again and again. > > Signed-off-by: Chongyun Wu Reviewed-by: Benjamin Marzinski > --- > multipathd/main.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/multipathd/main.c b/multipathd/main.c > index 7a

[dm-devel] [PATCH 1/4] mpathpersist: remove broken/unused code

2019-09-10 Thread Benjamin Marzinski
he best thing to do if disassemble_map() couldn't set pp->dev is simply to fail the path. Signed-off-by: Benjamin Marzinski --- libmpathpersist/mpath_persist.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/libmpathpersist/mpath_persist.c b/libmpat

[dm-devel] [PATCH 0/4] misc multipath patches

2019-09-10 Thread Benjamin Marzinski
These are a couple of disconnected multipath patches. Benjamin Marzinski (4): mpathpersist: remove broken/unused code libmultipath: EMC PowerMax NVMe device config mpathpersist: fix leaks libmultipath: fix mpcontext initialization libmpathpersist/mpath_persist.c | 16

[dm-devel] [PATCH 3/4] mpathpersist: fix leaks

2019-09-10 Thread Benjamin Marzinski
If handle_args() fails while looping through the argument list, it needs to free batch_fn, if it has been set. Also handle_args() needs to make sure to free the file descriptor after it has been opened. Signed-off-by: Benjamin Marzinski --- mpathpersist/main.c | 31

[dm-devel] [PATCH 2/4] libmultipath: EMC PowerMax NVMe device config

2019-09-10 Thread Benjamin Marzinski
Got this config from Dell. Cc: heyi Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index 96e8b25d..ca217e65 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c

[dm-devel] [PATCH 4/4] libmultipath: fix mpcontext initialization

2019-09-10 Thread Benjamin Marzinski
first initialized, and whenever the checker is called, if the checker's mpcontext hasn't been initialized. Signed-off-by: Benjamin Marzinski --- libmultipath/checkers.c | 29 ++-- libmultipath/checkers.h | 1 + libmultipath/checkers/ccis

Re: [dm-devel] [PATCH 3/4] mpathpersist: fix leaks

2019-09-13 Thread Benjamin Marzinski
On Fri, Sep 13, 2019 at 07:56:13AM +, Martin Wilck wrote: > On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > > If handle_args() fails while looping through the argument list, it > > needs > > to free batch_fn, if it has been set. Also handle_args() needs to

Re: [dm-devel] [PATCH 4/4] libmultipath: fix mpcontext initialization

2019-09-13 Thread Benjamin Marzinski
On Fri, Sep 13, 2019 at 08:28:59AM +, Martin Wilck wrote: > On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > > If a path is discovered before there is a multipath device for it to > > belong to, the checker will not have its mpcontext initialized, even > > i

[dm-devel] [PATCH v2 4/4] libmultipath: fix mpcontext initialization

2019-09-13 Thread Benjamin Marzinski
first initialized, and whenever the checker is called, if the checker's mpcontext hasn't been initialized. Signed-off-by: Benjamin Marzinski --- libmultipath/checkers.c | 27 +-- libmultipath/checkers.h | 1 + libmultipath/checkers/emc_

[dm-devel] [PATCH v2 0/4] misc multipath patches

2019-09-13 Thread Benjamin Marzinski
These are a couple of disconnected multipath patches. Changes in v2: 0003: As Martin suggested, fail immediately on wrong number of prin actions. 0004: mp_init now is an optional symbol for checker DSOs, and is ignored if it's missing, again at Martin's suggestion.

[dm-devel] [PATCH v2 1/4] mpathpersist: remove broken/unused code

2019-09-13 Thread Benjamin Marzinski
he best thing to do if disassemble_map() couldn't set pp->dev is simply to fail the path. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmpathpersist/mpath_persist.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/libmpathpersist/mpa

[dm-devel] [PATCH v2 3/4] mpathpersist: fix leaks

2019-09-13 Thread Benjamin Marzinski
If handle_args() fails while looping through the argument list, it needs to free batch_fn, if it has been set. Also handle_args() needs to make sure to free the file descriptor after it has been opened. Signed-off-by: Benjamin Marzinski --- mpathpersist/main.c | 33

[dm-devel] [PATCH v2 2/4] libmultipath: EMC PowerMax NVMe device config

2019-09-13 Thread Benjamin Marzinski
Got this config from Dell. Cc: heyi Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index 96e8b25d..ca217e65 100644 --- a/libmultipath/hwtable.c

[dm-devel] [PATCH] multipathd: warn when configuration has been changed.

2019-09-23 Thread Benjamin Marzinski
r trade-off to avoid repeatedly polling for files that aren't likely to appear. Signed-off-by: Benjamin Marzinski --- libmultipath/config.h | 1 + multipathd/main.c | 1 + multipathd/uxlsnr.c | 134 -- 3 files changed, 130 insertions(+), 6 d

Re: [dm-devel] [PATCH] multipathd: warn when configuration has been changed.

2019-09-30 Thread Benjamin Marzinski
On Fri, Sep 27, 2019 at 03:59:05PM +, Martin Wilck wrote: > On Mon, 2019-09-23 at 14:29 -0500, Benjamin Marzinski wrote: > > It would be helpful if multipathd could log a message when > > multipath.conf or files in the config_dir have been written to, both > > so >

Re: [dm-devel] multipath-tools: RH-patches for upstream ???

2019-10-03 Thread Benjamin Marzinski
On Thu, Oct 03, 2019 at 08:28:06PM +0200, Xose Vazquez Perez wrote: > Hi Benjamin, > > > Is there any relevant RH-patch for upstream in fedora repo: > https://src.fedoraproject.org/rpms/device-mapper-multipath/ ??? > > Maybe: > > - > https://src.fedoraproject.org/rpms/device-mapper-multipath/b

Re: [dm-devel] multipath-tools: RH-patches for upstream ???

2019-10-04 Thread Benjamin Marzinski
On Fri, Oct 04, 2019 at 07:03:26AM +, Martin Wilck wrote: > Hi Xose, hi Ben, > > On Thu, 2019-10-03 at 16:44 -0500, Benjamin Marzinski wrote: > > On Thu, Oct 03, 2019 at 08:28:06PM +0200, Xose Vazquez Perez wrote: > > > > Redhat doesn't include the udev rule

Re: [dm-devel] [PATCH 16/72] libmultipath: make path_discovery() pthread_cancel()-safe

2019-10-30 Thread Benjamin Marzinski
On Sat, Oct 12, 2019 at 09:27:57PM +, Martin Wilck wrote: > From: Martin Wilck > > The udev_enumerate and udev_device refs wouldn't be released > if the thread was cancelled. Fix it. > > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 51 +++--

Re: [dm-devel] [PATCH 13/72] libmultipath: alias.c: prepare for cancel-safe allocation

2019-10-30 Thread Benjamin Marzinski
On Sat, Oct 12, 2019 at 09:27:53PM +, Martin Wilck wrote: > From: Martin Wilck > > In functions that return newly allocated memory, avoid cancellation > points before returning, and if that's not possible, guard the code > that contains cancellation points with a cleanup function calling > fr

Re: [dm-devel] [PATCH 67/72] multipath-tools: Makefile.inc: use -Wp, ... for compiling only

2019-10-30 Thread Benjamin Marzinski
On Sat, Oct 12, 2019 at 09:29:01PM +, Martin Wilck wrote: > From: Martin Wilck > > clang-3.9 errors out if -Wp,... preprocessor flags are used in the > linking stage. > > Signed-off-by: Martin Wilck > --- > Makefile.inc | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > di

Re: [dm-devel] [PATCH v2 00/72] multipath-tools: cleanup and warning enablement

2019-10-30 Thread Benjamin Marzinski
On Thu, Oct 24, 2019 at 03:06:08PM +, Martin Wilck wrote: > From: Martin Wilck ACK for all the patches except 16 "libmultipath: make path_discovery() pthread_cancel()-safe" -Ben > > Hi Christophe, hi Ben, hi Bart, > > here is a series with cleanup patches and minor fixes for multipath-too

Re: [dm-devel] [PATCH 16/72] libmultipath: make path_discovery() pthread_cancel()-safe

2019-11-06 Thread Benjamin Marzinski
On Mon, Nov 04, 2019 at 08:29:21AM +, Martin Wilck wrote: > Hi Ben, > > thanks for looking into this. > > On Wed, 2019-10-30 at 09:53 -0500, Benjamin Marzinski wrote: > > On Sat, Oct 12, 2019 at 09:27:57PM +, Martin Wilck wrote: > > > From: Martin Wilck &

Re: [dm-devel] [PATCH] multipathd: fix mpp->nr_active more than actually active

2019-11-13 Thread Benjamin Marzinski
On Wed, Nov 13, 2019 at 09:32:33AM +0100, Martin Wilck wrote: > On Wed, 2019-11-13 at 07:16 +, Chongyun Wu wrote: > > Hi Martin, Ben and other viewers > > > > Cloud you help to view below patch, we have reproduce this issue and > > found a way to fix it, thanks. > > > > From b3e5d5919668b0318

Re: [dm-devel] [PATCH v3 45/72] libmultipath: fix -Wsign-compare warnings with snprintf()

2019-11-13 Thread Benjamin Marzinski
On Thu, Nov 07, 2019 at 09:27:41AM +, Martin Wilck wrote: > From: Martin Wilck Reviewed-by: Benjamin Marzinski > snprintf() returns int, but the size argument "n" is size_t. > Use safe_snprintf() to avoid -Wsign-compare warnings. At the same > time, improve the

Re: [dm-devel] [RFC PATCH] libmultipath: drop mpp->nr_active field

2019-11-14 Thread Benjamin Marzinski
On Wed, Nov 13, 2019 at 10:23:16PM +, Martin Wilck wrote: > From: Martin Wilck > > The tracking of nr_active has turned out to be error prone and hard > to verify. Calculating it on the fly is a quick operation, so > do this rather than trying to track nr_active. Use a boolean > field instead

Re: [dm-devel] [PATCH 3/5] libmultipath: drop mpp->nr_active field

2019-11-19 Thread Benjamin Marzinski
On Fri, Nov 15, 2019 at 02:41:50PM +, Martin Wilck wrote: > From: Martin Wilck > > The tracking of nr_active has turned out to be error prone and hard > to verify. Calculating it on the fly is a quick operation, so > do this rather than trying to track nr_active. Use a boolean > field instead

Re: [dm-devel] [PATCH 5/5] libmultipath: fix ALUA autodetection when paths are down

2019-11-19 Thread Benjamin Marzinski
On Fri, Nov 15, 2019 at 02:41:54PM +, Martin Wilck wrote: > From: Martin Wilck > > If a single path was offline when detect_alua() was called, > multipathd would assume ALUA was generally unsupported. > > Fix that by assuming that if at least one path has ALUA support and > no path explicitl

Re: [dm-devel] [PATCH 1/5] multipathd: move set_no_path_retry() back to libmultipath

2019-11-19 Thread Benjamin Marzinski
On Fri, Nov 15, 2019 at 02:41:46PM +, Martin Wilck wrote: > From: Martin Wilck > > This function is useful elsewhere, too. No code changes except > for changing the linkage. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmult

Re: [dm-devel] [PATCH 2/5] libmultipath: dict.c: rename duplicate set_no_path_retry()

2019-11-19 Thread Benjamin Marzinski
On Fri, Nov 15, 2019 at 02:41:48PM +, Martin Wilck wrote: > From: Martin Wilck > > We have two functions called set_no_path_retry(). Fix that by > renaming the function in dict.c to no_path_retry_helper(). > Reviewed-by: Benjamin Marzinski > Signed-of

Re: [dm-devel] [PATCH 4/5] libmultipath: fix (max_)polling_interval setting logic

2019-11-19 Thread Benjamin Marzinski
teger overflows should be avoided. > The logic should work reasonably well if both polling_interval and > max_polling_interval, just one of them, or neither is set. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/config.c | 40 +

Re: [dm-devel] [PATCH 5/5] libmultipath: fix ALUA autodetection when paths are down

2019-11-20 Thread Benjamin Marzinski
On Wed, Nov 20, 2019 at 12:33:15PM +, Martin Wilck wrote: > On Tue, 2019-11-19 at 16:29 -0600, Benjamin Marzinski wrote: > > On Fri, Nov 15, 2019 at 02:41:54PM +, Martin Wilck wrote: > > > From: Martin Wilck > > > > > > If a single path was o

Re: [dm-devel] [PATCH v2 3/5] libmultipath: drop mpp->nr_active field

2019-12-05 Thread Benjamin Marzinski
kely case mpp->features is NULL, don't assume that queuing is off, > just make no assumption about the current state. > Thanks. Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/configure.c | 5 +-- > libmultipath/devmapper.

[dm-devel] [PATCH 00/15] Multipath patch dump

2020-01-16 Thread Benjamin Marzinski
the io_destroy calls involved a major change to the directio checker. It's pretty hard to test a lot of the corner cases on actual hardware, so I've written a bunch of unit tests for this (patch 15). Benjamin Marzinski (15): multipathd: warn when configuration has bee

[dm-devel] [PATCH 01/15] multipathd: warn when configuration has been changed.

2020-01-16 Thread Benjamin Marzinski
r trade-off to avoid repeatedly polling for files that aren't likely to appear. Signed-off-by: Benjamin Marzinski --- libmultipath/config.h | 1 + multipathd/main.c | 1 + multipathd/uxlsnr.c | 134 -- 3 files changed, 130 insertions(+), 6 d

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