[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

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

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

2019-08-05 Thread Benjamin Marzinski
igger 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/libmult

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

2019-08-02 Thread Benjamin Marzinski
t; 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 100644 ---

[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 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 08/16] libmultipath: consolidate group_by_* functions

2019-08-02 Thread Benjamin Marzinski
, there 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 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 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 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 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 14/16] libmutipath: deprecate delay_*_checks

2019-08-02 Thread Benjamin Marzinski
of for a 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 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/vect

[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 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
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 policy unit tests

[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

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

2019-08-02 Thread Benjamin Marzinski
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/configur

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

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 &g

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

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 _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 space for

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

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

2019-06-03 Thread Benjamin Marzinski
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(+), 2 deletion

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

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 i

[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/vect

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

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

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

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 alre

[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 --git

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

2019-05-17 Thread Benjamin Marzinski
: 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 +++ b/

[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 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(+), 4

[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

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 try it)

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" Review

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

2019-05-15 Thread Benjamin Marzinski
eans 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 4/4] libmultipath: get_prio(): don't reset prio for inaccessible paths

2019-05-15 Thread Benjamin Marzinski
On Thu, Apr 11, 2019 at 12:49:23PM +0200, Martin Wilck wrote: > pathinfo() doesn't call get_prio() if a path is down, now keeping the old > priority value. But if a path becomes inaccessible between the state check > and the get_prio() call, retrieving the priority will likely fail, and the > path

[dm-devel] [RFC PATCH] multipath: check on multipathd without starting it

2019-04-18 Thread Benjamin Marzinski
in having it autoactivate when it gets an interactive command. Signed-off-by: Benjamin Marzinski --- multipath/main.c | 60 +++- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/multipath/main.c b/multipath/main.c index 69141dbc..008e3d3f 10064

Re: [dm-devel] [PATCH 0/4] multipath-tools: prio handling for offline paths

2019-04-18 Thread Benjamin Marzinski
On Thu, Apr 11, 2019 at 12:49:19PM +0200, Martin Wilck wrote: > A recent bug report revealed that the handling of path priorities is > inconsistent in multipathd when paths fail. In the current code, depending > on timing, the prio of a faild path may be reset to 0, reset to -1 > (PRIO_UNDEF), or

Re: [dm-devel] [PATCH] Fix systemd version detection

2019-04-04 Thread Benjamin Marzinski
On Fri, Apr 05, 2019 at 12:06:49AM +0200, Martin Wilck wrote: > Hi Ben, > > On Thu, 2019-04-04 at 17:03 -0500, Benjamin Marzinski wrote: > > From: Igor Gnatenko > > > > Reviewed-by: Benjamin Marzinski > > Signed-off-by: Igor Gnatenko > > I'd

[dm-devel] [PATCH] Fix systemd version detection

2019-04-04 Thread Benjamin Marzinski
From: Igor Gnatenko Reviewed-by: Benjamin Marzinski Signed-off-by: Igor Gnatenko --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index fc728ca..5b2f6d4 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -37,7 +37,7 @@ endif

[dm-devel] [PATCH v3 09/17] multipathd: use update_path_groups instead of reload_map

2019-03-30 Thread Benjamin Marzinski
reload_map() doesn't do the work to sync the state after reloading the map. Instead of calling it directly, cli_reload() and uev_update_path() should call update_path_groups(), which calls reload_map() with all the necessary syncing. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski

[dm-devel] [PATCH v3 13/17] multipathd: handle changed wwids by removal and addition

2019-03-30 Thread Benjamin Marzinski
s the path. This is patch is heavily based on the previous patch of the same name by Martin Wilck. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index 7a317d

[dm-devel] [PATCH v3 08/17] libmutipath: continue to use old state on PATH_PENDING

2019-03-30 Thread Benjamin Marzinski
ing. But otherwise, pathinfo() should leave the previous state alone. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index b08cb2d..28c0

[dm-devel] [PATCH v3 04/17] libmultipath: fix marginal paths queueing errors

2019-03-30 Thread Benjamin Marzinski
PATH_IO_ERR_IN_POLLING_RECHECK and the function hit_io_err_recheck_time() now apply to paths waiting to be enqueued for the first time as well, I've also changed their names to PATH_IO_ERR_WAITING_TO_CHECK and need_io_err_check(), respectively. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH v3 07/17] multipathd: ignore failed wwid recheck

2019-03-30 Thread Benjamin Marzinski
failed. Multipathd should neither set nor clear wwid_changed if get_uid() returned failure. Also, scsi_uid_fallback() should retain the old return value if it doesn't attempt to fallback. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 6 +++--- multipathd/main.c| 6

[dm-devel] [PATCH v3 12/17] libmulitpath: cleanup uid_fallback code

2019-03-30 Thread Benjamin Marzinski
of these changes should make the code function any differently. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 85 ++-- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index bece67c

[dm-devel] [PATCH v3 06/17] multipathd: Fix miscounting active paths

2019-03-30 Thread Benjamin Marzinski
orrect. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 11 ++- multipath/main.c | 2 +- multipathd/main.c| 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/disco

[dm-devel] [PATCH v3 17/17] libmultipath: silence dm_is_mpath error messages

2019-03-30 Thread Benjamin Marzinski
When "multipath -F" is run, dm_is_mpath was printing error messages about partition devices, because they had already been removed, when it checked. Lower the error logging level so this doesn't happen on the default verbosity. Signed-off-by: Benjamin Marzinski --- libmultipath/devma

[dm-devel] [PATCH v3 03/17] multipathd: cleanup marginal paths checking timers

2019-03-30 Thread Benjamin Marzinski
get recovered, or it will succeed, and we won't check the reinstate time again until poll_io_err_stat() marks the path as needing a requeue. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed

[dm-devel] [PATCH v3 15/17] multipathd: ignore "disable_changed_wwids"

2019-03-30 Thread Benjamin Marzinski
From: Martin Wilck This option has no effect any more. Signed-off-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 1 - libmultipath/config.h | 1 - libmultipath/dict.c| 18 +++--- multipath/multipath.conf.5 | 8 ++-- 4 files

[dm-devel] [PATCH v3 16/17] multipathd: Don't use fallback code after getting wwid

2019-03-30 Thread Benjamin Marzinski
, but that's a small price to pay for doing the right thing most of the time. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 22 +- libmultipath/discovery.h | 3 ++- multipathd/main.c| 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git

[dm-devel] [PATCH v3 05/17] libmultipath: fix marginal_paths nr_active check

2019-03-30 Thread Benjamin Marzinski
Marginal paths are SHAKY, so they don't count towards the number of active paths. poll_io_err_stat() shouldn't automatically reinstate a marginal path if there already is an active path. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file

[dm-devel] [PATCH v3 11/17] libmultipath: add get_uid fallback code for NVMe devices

2019-03-30 Thread Benjamin Marzinski
If multipath can't get the uid for NVMe devices from udev, it can get it directly from sysfs. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 49 1 file changed, 34 insertions(+), 15 deletions(-) diff --git

[dm-devel] [PATCH v3 14/17] multipathd: remove "wwid_changed" path attribute

2019-03-30 Thread Benjamin Marzinski
From: Martin Wilck This is now not needed any more. Signed-off-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/structs.h | 1 - multipathd/main.c | 6 -- 2 files changed, 7 deletions(-) diff --git a/libmultipath/structs.h b/libmultipath/structs.h index b794b0d

[dm-devel] [PATCH v3 10/17] multipath.conf: add missing options to man page

2019-03-30 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 10 ++ 1 file changed, 10 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 0fe8461..864d7eb 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1468,6

[dm-devel] [PATCH v3 02/17] libmultipath: handle existing paths in marginal_path enqueue

2019-03-30 Thread Benjamin Marzinski
If the path that enqueue_io_err_stat_by_path() is trying to add is already on the list, just return success. There's no reason to fail in this case. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 6 ++ 1 file changed, 2 insertions(+), 4

[dm-devel] [PATCH v3 01/17] BZ 1668693: disable user_friendly_names for NetApp

2019-03-30 Thread Benjamin Marzinski
config. Reviewed-by: Martin Wilck 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 d3a8d9b..8776411 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -719,6

[dm-devel] [PATCH v3 00/17] Misc Multipath patches

2019-03-30 Thread Benjamin Marzinski
devices, to grab the wwid directly from sysfs. Benjamin Marzinski (15): libmulitpath: disable user_friendly_names for NetApp libmultipath: handle existing paths in marginal_path enqueue multipathd: cleanup marginal paths checking timers libmultipath: fix marginal paths q

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-25 Thread Benjamin Marzinski
On Tue, Mar 19, 2019 at 07:44:09PM +0100, Martin Wilck wrote: > On Tue, 2019-03-19 at 12:11 -0500, Benjamin Marzinski wrote: > > On Mon, Mar 18, 2019 at 01:12:32PM +0100, Martin Wilck wrote: > > > > d) and e) seem to me like by far the most likely scenarios, so doing >

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-22 Thread Benjamin Marzinski
On Fri, Mar 22, 2019 at 12:28:56PM +0100, Martin Wilck wrote: > On Thu, 2019-03-21 at 17:31 -0500, Benjamin Marzinski wrote: > > > > ideally, we would be able to determine whether or not udev was able > > to > > get all the necessary information. It would be nice to

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-21 Thread Benjamin Marzinski
On Wed, Mar 20, 2019 at 09:37:35AM +0100, Martin Wilck wrote: > On Tue, 2019-03-19 at 19:44 +0100, Martin Wilck wrote: > > On Tue, 2019-03-19 at 12:11 -0500, Benjamin Marzinski wrote: > > > On Mon, Mar 18, 2019 at 01:12:32PM +0100, Martin Wilck wrote: > >

Re: [dm-devel] [PATCH v3 00/10] multipath-tools: avoid I/O during uevent processing

2019-03-19 Thread Benjamin Marzinski
> and made it attempt to read INQUIRY data from sysfs. > > Regards, > Martin Reviewed-by: Benjamin Marzinski for the set. > Changes v2->v3: > > - added 8/10 "tidy up do_set_from_hwe() with statement expression" >(Hannes), renumber subsequent patches a

Re: [dm-devel] [PATCH v3 05/10] libmultipath: detect_alua(): use system timeout

2019-03-19 Thread Benjamin Marzinski
e we deal with verbosity, where, we track it outside of the config structure. But that doesn't need to be dealt with now, so Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletio

Re: [dm-devel] [PATCH v2 12/12] multipathd: change failed get_uid handling

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:50:14PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > Instead of ignoring failed get_uid() calls, multipathd now fails the > > path as it originally did. > > This patch reverts much of 07/12; I'd ap

Re: [dm-devel] [PATCH v2 11/12] libmultipath: add get_uid fallback code for NVMe devices

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:49:41PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > If multipath can't get the uid for NVMe devices from udev, it can get > > it > > directly from sysfs. > > > >

Re: [dm-devel] [PATCH v2 10/12] multipath.conf: add missing options to man page

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:49:26PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > Signed-off-by: Benjamin Marzinski > > --- > > multipath/multipath.conf.5 | 8 > > 1 file changed, 8 insertions(+) > > >

Re: [dm-devel] [PATCH v2 07/12] multipathd: ignore failed wwid recheck

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:48:49PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > If disable_changed_wwids is set, when multipathd gets a change event > > on > > a path, it verifies that the wwid hasn't changed in > > uev_up

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-19 Thread Benjamin Marzinski
On Mon, Mar 18, 2019 at 01:12:32PM +0100, Martin Wilck wrote: > Hi Ben, hi Christophe, > > after reviewing Ben's last patch set, I've been pondering over the > handling of changed WWIDs, which seems to have become a bit too clever > and complex for my taste, and I came up with this new approach >

Re: [dm-devel] multipathd ignoring dev_loss_tmo setting

2019-03-12 Thread Benjamin Marzinski
On Mon, Mar 04, 2019 at 09:48:59AM +, Martins, Bruno O wrote: > On Fri, 2019-03-01 at 11:35 -0600, Benjamin Marzinski wrote: > > On Fri, Mar 01, 2019 at 10:04:52AM +, Martins, Bruno O wrote: > > > On Thu, 2019-02-28 at 13:53 -0600, Benjamin Marzinski wrote: > >

[dm-devel] [PATCH v2 07/12] multipathd: ignore failed wwid recheck

2019-03-08 Thread Benjamin Marzinski
failed. Multipathd should neither set nor clear wwid_changed if get_uid() returned failure. Also, scsi_uid_fallback() should retain the old return value if it doesn't attempt to fallback. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 6 +++--- multipathd/main.c| 6

[dm-devel] [PATCH v2 12/12] multipathd: change failed get_uid handling

2019-03-08 Thread Benjamin Marzinski
uid() use the fallback methods, pathinfo now sets pp->retriggers to the retrigger_tries once a WWID has be successfully obtained, so that it uid_fallback() doesn't need to be called retrigger_tries times before trying the fallback methods. Signed-off-by: Benjamin Marzinski --- libmultipath/disco

[dm-devel] [PATCH v2 10/12] multipath.conf: add missing options to man page

2019-03-08 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 8 1 file changed, 8 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 0fe8461..1e0714f 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1494,6 +1494,8

[dm-devel] [PATCH v2 09/12] multipathd: use update_path_groups instead of reload_map

2019-03-08 Thread Benjamin Marzinski
reload_map() doesn't do the work to sync the state after reloading the map. Instead of calling it directly, cli_reload() and uev_update_path() should call update_path_groups(), which calls reload_map() with all the necessary syncing. Signed-off-by: Benjamin Marzinski --- multipathd

[dm-devel] [PATCH v2 00/12] Misc Multipath patches

2019-03-08 Thread Benjamin Marzinski
submitting the patch. But I still not sure that its not better simply to assume that if get_uid() fails, that it did so for some mundane reason, and simply keep the old wwid. Benjamin Marzinski (12): libmultipath: disable user_friendly_names for NetApp libmultipath: handl

[dm-devel] [PATCH v2 04/12] libmultipath: fix marginal paths queueing errors

2019-03-08 Thread Benjamin Marzinski
PATH_IO_ERR_IN_POLLING_RECHECK and the function hit_io_err_recheck_time() now apply to paths waiting to be enqueued for the first time as well, I've also changed their names to PATH_IO_ERR_WAITING_TO_CHECK and need_io_err_check(), respectively. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH v2 08/12] libmutipath: continue to use old state on PATH_PENDING

2019-03-08 Thread Benjamin Marzinski
ing. But otherwise, pathinfo() should leave the previous state alone. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index b08cb2d..28c0

[dm-devel] [PATCH v2 05/12] libmultipath: fix marginal_paths nr_active check

2019-03-08 Thread Benjamin Marzinski
Marginal paths are SHAKY, so they don't count towards the number of active paths. poll_io_err_stat() shouldn't automatically reinstate a marginal path if there already is an active path. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file

[dm-devel] [PATCH v2 11/12] libmultipath: add get_uid fallback code for NVMe devices

2019-03-08 Thread Benjamin Marzinski
If multipath can't get the uid for NVMe devices from udev, it can get it directly from sysfs. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 49 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/libmultipath/discovery.c b

[dm-devel] [PATCH v2 01/12] libmultipath: disable user_friendly_names for NetApp

2019-03-08 Thread Benjamin Marzinski
config. Reviewed-by: Martin Wilck 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 d3a8d9b..8776411 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -719,6

[dm-devel] [PATCH v2 02/12] libmultipath: handle existing paths in marginal_path enqueue

2019-03-08 Thread Benjamin Marzinski
If the path that enqueue_io_err_stat_by_path() is trying to add is already on the list, just return success. There's no reason to fail in this case. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 6 ++ 1 file changed, 2 insertions(+), 4

[dm-devel] [PATCH v2 06/12] multipathd: Fix miscounting active paths

2019-03-08 Thread Benjamin Marzinski
orrect. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 11 ++- multipath/main.c | 2 +- multipathd/main.c| 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/disco

[dm-devel] [PATCH v2 03/12] multipathd: cleanup marginal paths checking timers

2019-03-08 Thread Benjamin Marzinski
get recovered, or it will succeed, and we won't check the reinstate time again until poll_io_err_stat() marks the path as needing a requeue. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed

Re: [dm-devel] multipathd ignoring dev_loss_tmo setting

2019-03-01 Thread Benjamin Marzinski
On Fri, Mar 01, 2019 at 10:04:52AM +, Martins, Bruno O wrote: > On Thu, 2019-02-28 at 13:53 -0600, Benjamin Marzinski wrote: > > On Thu, Feb 28, 2019 at 11:38:22AM +, Martins, Bruno O wrote: > > > Hello guys, > > > > > > I am trying to modify

Re: [dm-devel] multipathd ignoring dev_loss_tmo setting

2019-02-28 Thread Benjamin Marzinski
On Thu, Feb 28, 2019 at 11:38:22AM +, Martins, Bruno O wrote: > Hello guys, > > I am trying to modify /etc/multipath.conf on my system so that the > parameter 'dev_loss_tmo' is changed from the default value. > > However, when checking the value currently in use I am getting the > wrong

Re: [dm-devel] [PATCH 9/9] multipathd: use update_path_groups instead of reload_map

2019-02-26 Thread Benjamin Marzinski
On Tue, Feb 26, 2019 at 11:47:29AM +0100, Martin Wilck wrote: > On Fri, 2019-02-22 at 10:58 -0600, Benjamin Marzinski wrote: > > reload_map() doesn't do the work to sync the state after reloading > > the > > map. Instead of calling it directly, cli_reload() and > > u

Re: [dm-devel] [PATCH 8/9] libmutipath: continue to use old state on PATH_PENDING

2019-02-26 Thread Benjamin Marzinski
On Tue, Feb 26, 2019 at 11:12:47AM +0100, Martin Wilck wrote: > On Fri, 2019-02-22 at 10:58 -0600, Benjamin Marzinski wrote: > > When pathinfo() sets pp->state to PATH_PENDING, it can cause problems > > with path checking. It should act more like check_path(). When > >

Re: [dm-devel] [PATCH 7/9] multipathd: ignore failed wwid recheck

2019-02-26 Thread Benjamin Marzinski
On Tue, Feb 26, 2019 at 10:42:49AM +0100, Martin Wilck wrote: > On Fri, 2019-02-22 at 10:58 -0600, Benjamin Marzinski wrote: > > If disable_changed_wwids is set, when multipathd gets a change event > > on > > a path, it verifies that the wwid hasn't changed in > > uev_up

[dm-devel] [PATCH 8/9] libmutipath: continue to use old state on PATH_PENDING

2019-02-22 Thread Benjamin Marzinski
ing. But otherwise, pathinfo() should leave the previous state alone. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 729bcb9..d3585f9 100644 --- a/libmultip

[dm-devel] [PATCH 9/9] multipathd: use update_path_groups instead of reload_map

2019-02-22 Thread Benjamin Marzinski
reload_map() doesn't do the work to sync the state after reloading the map. Instead of calling it directly, cli_reload() and uev_update_path() should call update_path_groups(), which calls reload_map() with all the necessary syncing. Signed-off-by: Benjamin Marzinski --- multipathd

[dm-devel] [PATCH 7/9] multipathd: ignore failed wwid recheck

2019-02-22 Thread Benjamin Marzinski
the wwid. Even if get_uid() failed because the path was down, it no change uevent happend when it later became active, multipathd would continue to ignore the path. Instead, multipathd should neither set nor clear wwid_changed if get_uid() returned failure. Signed-off-by: Benjamin Marzinski

[dm-devel] [PATCH 5/9] libmultipath: fix marginal_paths nr_active check

2019-02-22 Thread Benjamin Marzinski
Marginal paths are SHAKY, so they don't count towards the number of active paths. poll_io_err_stat() shouldn't automatically reinstate a marginal path if there already is an active path. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file

[dm-devel] [PATCH 6/9] multipathd: Fix miscounting active paths

2019-02-22 Thread Benjamin Marzinski
orrect. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 11 ++- multipath/main.c | 2 +- multipathd/main.c| 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 10bd8cd..729bcb9

[dm-devel] [PATCH 1/9] libmultipath: disable user_friendly_names for NetApp

2019-02-22 Thread Benjamin Marzinski
config. 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 d3a8d9b..8776411 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -719,6 +719,7 @@ static struct

[dm-devel] [PATCH 3/9] multipathd: cleanup marginal paths checking timers

2019-02-22 Thread Benjamin Marzinski
get recovered, or it will succeed, and we won't check the reinstate time again until poll_io_err_stat() marks the path as needing a requeue. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed

<    8   9   10   11   12   13   14   15   16   17   >