Re: [dm-devel] [PATCH v3 27/38] multipathd: watch bindings file with inotify + timestamp

2023-09-15 Thread Benjamin Marzinski
ng reconfigure(), or when a new map is created during > runtime. Existing maps will not be renamed if the binding file changes, > unless the user runs "multipathd reconfigure". This is not a change > wrt the previous code, but it should be mentioned anyway. > Reviewed-by

Re: [dm-devel] [PATCH v2 27/37] multipathd: watch bindings file with inotify + timestamp

2023-09-15 Thread Benjamin Marzinski
On Thu, Sep 14, 2023 at 03:25:35PM +0200, Martin Wilck wrote: > On Wed, 2023-09-13 at 17:07 -0500, Benjamin Marzinski wrote: > > On Mon, Sep 11, 2023 at 06:38:36PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > Since "libmultipath: k

Re: [dm-devel] [PATCH v3 38/38] libmultipath: avoid -Warray-bounds error in uatomic operations

2023-09-14 Thread Benjamin Marzinski
g a workaround for uatomic_xchg(), > and introduce the macro URCU_VERSION (originally only used for multipathd) > globally. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > Makefile.inc | 2 +- > create-config.mk |

Re: [dm-devel] [PATCH v3 26/38] multipath-tools tests: add test for ordering of bindings

2023-09-14 Thread Benjamin Marzinski
On Thu, Sep 14, 2023 at 04:51:29PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > As the assignment of free aliases now relies on the bindings being > properly sorted, add some unit tests to make sure the sorting algorithm > works. > Reviewed-by: Benjamin Marzi

Re: [dm-devel] [PATCH v2 27/37] multipathd: watch bindings file with inotify + timestamp

2023-09-14 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:36PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Since "libmultipath: keep bindings in memory", we don't re-read the > bindings file after every modification. Add a notification mechanism > that makes multipathd aware of changes to the bindings file.

Re: [dm-devel] [PATCH v2 22/37] libmultipath: sort aliases by length and strcmp

2023-09-13 Thread Benjamin Marzinski
On Wed, Sep 13, 2023 at 09:07:27PM +0200, Martin Wilck wrote: > On Wed, 2023-09-13 at 09:38 -0500, Benjamin Marzinski wrote: > > On Wed, Sep 13, 2023 at 03:53:25PM +0200, Martin Wilck wrote: > > > On Tue, 2023-09-12 at 18:00 -0500, Benjamin Marzinski wrote: > > > >

Re: [dm-devel] [PATCH v2 37/37] libmultipath: deprecate bindings_file, wwids_file, prkeys_file

2023-09-13 Thread Benjamin Marzinski
Deprecate and ignore them now. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/alias.c | 43 +-- > libmultipath/alias.h | 3 +- > libmultipath/config.c | 18 > libmultipat

Re: [dm-devel] [PATCH v2 36/37] multipath-tools: allow prefixes with and w/o trailing slash

2023-09-13 Thread Benjamin Marzinski
work for multiple trailing slashes. It applies > to all XYZ_prefix variables in Makefile.inc. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > Makefile.inc | 35 ++- > 1 file changed, 22 insertions(+), 13 deletions(-) >

Re: [dm-devel] [PATCH v2 35/37] multipath: add a missing newline

2023-09-13 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:44PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipath/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/multipath/main.c b/

Re: [dm-devel] [PATCH v2 34/37] libmultipath: print built-in values for deprecated options

2023-09-13 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:43PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > In the error messages we print when a deprecated option is encountered, > print the compile-time value of the option. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH v2 33/37] multipath-tools: README.md: improve documentation for compile-time options

2023-09-13 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:42PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > README.md | 38 ++ > 1 file changed, 26 insertions(+), 12 deletions(-) > >

Re: [dm-devel] [PATCH v2 31/37] multipath-tools man pages: generate with correct paths

2023-09-13 Thread Benjamin Marzinski
n configuration files in the multipath.conf man page. > > Also, make sure all generated man pages and other files are correctly > removed by "make clean". > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > .gitignore

Re: [dm-devel] [PATCH v2 32/37] libdmmp/Makefile: fix bug in install section

2023-09-13 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:41PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libdmmp/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libdmmp/Makefile b/

Re: [dm-devel] [PATCH v2 30/37] multipath-tools: add compile time configuration for "/etc/multipath"

2023-09-13 Thread Benjamin Marzinski
quot;statedir" compile-time option. The default is currently still > /etc, it might change to /var/lib or similar in the future. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > Makefile.inc| 4 +++- > libmultipath/defaults.h | 6 +++--- &

Re: [dm-devel] [PATCH v2 29/37] multipath-tools Makefile: sanitize paths for configuration files

2023-09-13 Thread Benjamin Marzinski
this (rather > inconsistent) behavior is desired, use the following command line: > > make prefix=/usr configfile=/etc/multipath.conf Reviewed-by: Benjamin Marzinski > --- > Makefile.inc| 9 ++--- > libmultipath/defaults.h | 1 - > 2 files changed, 6 insertion

Re: [dm-devel] [PATCH v2 28/37] multipath-tools tests: mock pthread_mutex_{lock, unlock}

2023-09-13 Thread Benjamin Marzinski
't get properly unlocked. Just > mock the lock/unlock functions and generate an error if they weren't paired at > the end of the test. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/Makefile | 1 + > tests/alias.c | 46 +

Re: [dm-devel] [PATCH v2 22/37] libmultipath: sort aliases by length and strcmp

2023-09-13 Thread Benjamin Marzinski
On Wed, Sep 13, 2023 at 03:53:25PM +0200, Martin Wilck wrote: > On Tue, 2023-09-12 at 18:00 -0500, Benjamin Marzinski wrote: > > On Mon, Sep 11, 2023 at 06:38:31PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > The current sort order of al

Re: [dm-devel] [PATCH v2 26/37] multipath-tools tests: add test for ordering of bindings

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:35PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > As the assignment of free aliases now relies on the bindings being > properly sorted, add some unit tests to make sure the sorting algorithm > works. On second thought... > --- > tests/alias.c | 212

Re: [dm-devel] [PATCH v2 26/37] multipath-tools tests: add test for ordering of bindings

2023-09-12 Thread Benjamin Marzinski
erwise Reviewed-by: Benjamin Marzinski > --- > tests/alias.c | 212 +- > 1 file changed, 209 insertions(+), 3 deletions(-) > > diff --git a/tests/alias.c b/tests/alias.c > index dff5f93..2e765fb 100644 > --- a/tests/alias.c &g

Re: [dm-devel] [PATCH v2 25/37] multipath-tools tests: adapt alias tests for total ordering

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:34PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The "unsorted" test fail now, and are removed. The algorithm is now > better at finding "gaps". > Reviewed-by: Benjamin Marzinski > Signed-off-by: Mar

Re: [dm-devel] [PATCH v2 23/37] multipath-tools tests: fix alias test after sort order change

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:32PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/alias.c | 30 -- > 1 file changed, 12 insertions(+), 18 deletions(-) > > di

Re: [dm-devel] [PATCH v2 18/37] libmultipath: keep bindings in memory

2023-09-12 Thread Benjamin Marzinski
ghtly different > than before. The logic is summarized in a comment in the code. Unit tests > will be provided that illustrate the changes. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/alias.c | 359 ---

Re: [dm-devel] [PATCH v2 22/37] libmultipath: sort aliases by length and strcmp

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:31PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The current sort order of aliases is alphabetical, which is does not match > the actual order of aliases, where "mpathaa" > "mpathz". Change the ordering > as > follows: first sort by string length, then

Re: [dm-devel] [PATCH v2 07/37] multipath-tools tests: add tests for get_user_friendly_alias()

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:16PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/alias.c | 441 ++ > 1 file changed, 441 insertions(+) >

Re: [dm-devel] [PATCH v2 04/37] libmultipath: never allocate an alias that's already taken

2023-09-12 Thread Benjamin Marzinski
; reuse", > alias_old, buff); > - goto new_alias; Double semicolon. Doesn't really hurt anything, and it gets removed later in the patchset, so: Reviewed-by: Benjamin Marzinski > + goto new_alias;

Re: [dm-devel] [PATCH v2 02/37] libmultipath: add alias_already_taken()

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:11PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Factor out a trivial helper function. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/alias.c | 32 +++- > 1 fil

Re: [dm-devel] [PATCH v2 24/37] libmultipath: simplify get_free_id() assuming total ordering

2023-09-12 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 06:38:33PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If we can assume that the bindings array is totally ordered for every > prefix, which the previous patch guarantees, the search for a free ID can be > simplified. > Reviewed-by:

Re: [dm-devel] [PATCH v2 19/37] multipath-tools tests: fix alias tests

2023-09-12 Thread Benjamin Marzinski
heck for an existing entry and the > search for a new ID. The new algorithm does this in two separate steps and > tests for used aliases in between, which causes a change in the order in > which > log messages are emitted. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Mar

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-11 Thread Benjamin Marzinski
On Mon, Sep 11, 2023 at 08:25:05AM +0200, Martin Wilck wrote: > On Fri, 2023-09-08 at 12:22 -0500, Benjamin Marzinski wrote: > > On Thu, Sep 07, 2023 at 10:43:27PM +0200, Martin Wilck wrote:  > > > Our bindings list is now partially sorted, which is an improvement > >

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-08 Thread Benjamin Marzinski
On Thu, Sep 07, 2023 at 10:43:27PM +0200, Martin Wilck wrote: > On Thu, 2023-09-07 at 15:02 -0500, Benjamin Marzinski wrote: > > On Thu, Sep 07, 2023 at 02:14:04PM -0500, Benjamin Marzinski wrote: > > > On Thu, Sep 07, 2023 at 12:30:53PM +0200, Martin Wilck wrote: > > >

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-07 Thread Benjamin Marzinski
On Thu, Sep 07, 2023 at 02:14:04PM -0500, Benjamin Marzinski wrote: > On Thu, Sep 07, 2023 at 12:30:53PM +0200, Martin Wilck wrote: > > On Wed, 2023-09-06 at 17:47 -0500, Benjamin Marzinski wrote: > > > On Fri, Sep 01, 2023 at 08:02:31PM +0200, mwi...@suse.com wrote: > >

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-07 Thread Benjamin Marzinski
On Thu, Sep 07, 2023 at 12:30:53PM +0200, Martin Wilck wrote: > On Wed, 2023-09-06 at 17:47 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 01, 2023 at 08:02:31PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > +   

Re: [dm-devel] [PATCH 21/21] libmultipath: adapt to new semantics of dm_get_uuid()

2023-09-06 Thread Benjamin Marzinski
turn false. > > This makes the "failed alias" test mostly obsolete, as "failed" is now > treated as "unused". > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/alias.c | 23 --- > tests/ali

Re: [dm-devel] [PATCH 20/21] libmultipath: dm_get_uuid(): return emtpy UUID for non-existing maps

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:33PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > libdevmapper will most probably not return a UUID for non-existing > maps anyway. But it's cheap to double-check here. > Reviewed-by: Benjamin Marzinski > Signed-of

Re: [dm-devel] [PATCH 19/21] multipath-tools tests: fix alias tests

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:32PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The different implementation of get_user_friendly_alias() and its helpers > necessitates changes in the unit tests. It would be nice if it didn't, but the > unit tests are too closely bound to the

Re: [dm-devel] [PATCH 18/21] libmultipath: keep bindings in memory

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:31PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Rather than opening the bindings file every time we must retrieve > a binding, keep the contents in memory and write the file only > if additions have been made. This simplifies the code, and should speed

Re: [dm-devel] [PATCH 17/21] libmultipath: alias.c: factor out read_binding()

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:30PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > This way we can test the parsing of input lines from the bindings > file more easily. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > l

Re: [dm-devel] [PATCH 16/21] libmultipath: update_bindings_file: don't log temp file name

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:29PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The name of the temp file is unlikely to be helpful for uses, > and hard to predict in the unit test. Omit it. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH 15/21] libmultipath: update_bindings_file: use a single write()

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:28PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Save code and syscalls by assembling the content in memory first. > write() may return less bytes written than expected. Deal with it. > Reviewed-by: Benjamin Marzinski > Signed-of

Re: [dm-devel] [PATCH 14/21] libmultipath: update_bindings_file: take filename argument

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:27PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > This function just uses the file name, no other configuration > parameters. Also, pass the Bindings argument first to use the > same convention as the other functions in this file. > Rev

Re: [dm-devel] [PATCH 13/21] libmultipath: alias.c: move bindings related code up

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:26PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > No code changes, just moving code. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/alias.c | 239 ++- &

Re: [dm-devel] [PATCH 12/21] libmultipath: rename fix_bindings_file() to update_bindings_file()

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:25PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > We will use this function in a more generic way, give it a more > generic name. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/alias.c | 6

Re: [dm-devel] [PATCH 11/21] libmultipath: add global variable for current bindings

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:24PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Add a variable global_bindings that holds the currently active vector of > bindings. This variable is freed at program exit. > Reviewed-by: Benjamin Marzinski > Signed-of

Re: [dm-devel] [PATCH 09/21] multipath-tools tests: convert mock_{failed, used}_alias to macros

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:22PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > This way we can further improve readability of the individual test > cases. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > ---

Re: [dm-devel] [PATCH 10/21] multipath-tools test: use mock_bindings_file() consistently

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:23PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Further improve test readablity. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/alias.c | 186 ++

Re: [dm-devel] [PATCH 08/21] multipath-tools test: consistent use of macros in alias test

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:21PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Used the macros introduced with the tests for get_user_friendly_alias() > also in the previously existing tests. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH 07/21] multipath-tools tests: add tests for get_user_friendly_alias()

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:20PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Signed-off-by: Martin Wilck > --- > tests/alias.c | 531 ++ > 1 file changed, 531 insertions(+) > > diff --git a/tests/alias.c b/tests/alias.c > index

Re: [dm-devel] [PATCH 06/21] multipath-tools test: simplify debugging for condlog mismatch

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:19PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If there's a mismatch between expected and actual log message, > print both messages. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/test-log.c |

Re: [dm-devel] [PATCH 05/21] libmultipath: lookup_binding: add comment about the algorithm

2023-09-06 Thread Benjamin Marzinski
k is (id >= smallest_bigger_id), but as long as no ID occurs more than once, id can never actually be bigger than smallest_bigger_id since id only gets incremented when (curr_id == id) and if smallest_bigger_id is not INT_MAX, then smallest_bigger_id already occured once in the file before i

Re: [dm-devel] [PATCH 02/21] libmultipath: add alias_already_taken()

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:15PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Factor out a trivial helper function. > > Signed-off-by: Martin Wilck > Cc: David Bond > --- > libmultipath/alias.c | 34 -- > 1 file changed, 20 insertions(+), 14

Re: [dm-devel] [PATCH 04/21] libmultipath: never allocate an alias that's already taken

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:17PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If the bindings file is changed in a way that multipathd can't handle > (e.g. by swapping the aliases of two maps), multipathd must not try > to re-use an alias that is already used by another map. Creating

Re: [dm-devel] [PATCH 03/21] libmultipath: unify use_existing_alias() and get_user_friendly_alias()

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:16PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > These functions are only called from select_alias(). The logic > is more obvious when unified in a single function. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski

Re: [dm-devel] [PATCH 01/21] libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN

2023-09-06 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 08:02:14PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > "multipath -d" might change sysfs timeouts of SCSI devices. > Make sure it doesn't. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > Cc: Jehan Singh &g

Re: [dm-devel] [PATCH] Fix hwtable test after "libmultipath: don't bother to recheck timeout"

2023-09-05 Thread Benjamin Marzinski
On Fri, Sep 01, 2023 at 11:24:39PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The previous patch "libmultipath: don't bother to recheck timeout" > causes sysfs_get_timeout() to be called less frequently. Adapt the > tests. > Oops. Reviewed-by: Benj

[dm-devel] [PATCH v2 3/4] libmultipath: make prioritizer timeouts work like checker timeouts

2023-08-31 Thread Benjamin Marzinski
that the timeout was in a different unit than it was (seconds vs milliseconds). Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 18 +- libmultipath/libmultipath.version| 4 +-- libmultipath/prio.c | 21

[dm-devel] [PATCH v2 4/4] libmultipath: standardize datacore prioritizer timeouts

2023-08-31 Thread Benjamin Marzinski
If users don't add a timeout to the datacore priorizier arguments, it should use the checker_timeout. Also, don't limit possible timeout values, to match the other prioritizers. Signed-off-by: Benjamin Marzinski --- libmultipath/prioritizers/datacore.c | 16 ++-- 1 file changed, 6

[dm-devel] [PATCH v2 2/4] libmultipath: make checker_timeout a path variable

2023-08-31 Thread Benjamin Marzinski
Factor the code to get the checker_timeout out of select_checker() into its own select_checker_timeout function, and use that to set a path variable. This variable will be used by future patches. Signed-off-by: Benjamin Marzinski --- libmultipath/propsel.c | 33

[dm-devel] [PATCH v2 1/4] libmultipath: don't bother to recheck timeout

2023-08-31 Thread Benjamin Marzinski
ing. They can alway reload multipathd if they want it changed, anyways. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 5626d48d..c90c51a6 100644 --- a/libmultipath/discover

[dm-devel] [PATCH v2 0/4] Make prio timeouts work like checkers

2023-08-31 Thread Benjamin Marzinski
ixes the issues in detect_prio() and the path_latency prioritizer. Patch [4/4] is new. It makes the datacore checker respect the checker timeout as well, if no timeout is specified in the prio args. Benjamin Marzinski (4): libmultipath: don't bother to recheck timeout libmultipath:

Re: [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers

2023-08-30 Thread Benjamin Marzinski
On Tue, Aug 29, 2023 at 08:34:39PM +, Martin Wilck wrote: > On Fri, 2023-07-28 at 14:05 -0500, Benjamin Marzinski wrote: > > This patchset changes how prioritizers set their timeouts, to make > > them > > match how the checker functions work, and also cleans up some minor

Re: [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers

2023-08-24 Thread Benjamin Marzinski
On Fri, Jul 28, 2023 at 02:05:51PM -0500, Benjamin Marzinski wrote: Ping. Perhaps this patchset got overlooked. -Ben > This patchset changes how prioritizers set their timeouts, to make them > match how the checker functions work, and also cleans up some minor > timeout issu

Re: [dm-devel] [PATCH RFC] multipath-tools: treat disable_changed_wwids like other deprecated keywords

2023-08-03 Thread Benjamin Marzinski
On Fri, Jul 07, 2023 at 02:19:51PM +0200, Xose Vazquez Perez wrote: > Cc: Martin Wilck > Cc: Benjamin Marzinski > Cc: Christophe Varoqui > Cc: DM-DEVEL ML > Signed-off-by: Xose Vazquez Perez Reviewed-by: Benjamin Marzinski > --- > libmultipath/dict.c | 27 ++-

[dm-devel] [RFC PATCH 4/4] libmultipath: fix timeouts for path_latency prioritizer

2023-07-28 Thread Benjamin Marzinski
The path_latency prioritizer didn't call get_prio_timeout, so that the timeout could possibly be 0. Also, it was assuming that the timeout was in seconds, instead of milliseconds. Signed-off-by: Benjamin Marzinski --- libmultipath/prioritizers/path_latency.c | 5 +++-- 1 file changed, 3

[dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers

2023-07-28 Thread Benjamin Marzinski
, and I can resend just the bugfixes. Benjamin Marzinski (4): libmultipath: don't bother to reset default timeout value libmultipath: make prioritizer timeouts work like checker timeouts libmultipath: fix timeouts for detect_alua() libmultipath: fix timeouts for path_latency prioritizer

[dm-devel] [RFC PATCH 3/4] libmultipath: fix timeouts for detect_alua()

2023-07-28 Thread Benjamin Marzinski
detect_alua calls prioritizer functions that expect the timeout to be in milliseconds instead of seconds. Fix this and also respect the checker_timeout setting. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

[dm-devel] [RFC PATCH 2/4] libmultipath: make prioritizer timeouts work like checker timeouts

2023-07-28 Thread Benjamin Marzinski
if set, then use the sysfs tiemout for scsi devices, or 30 seconds for non-scsi devices. Signed-off-by: Benjamin Marzinski --- libmultipath/prio.c | 14 +- libmultipath/prio.h | 3 +-- libmultipath/prioritizers/alua.c | 2 +- libmultipath

[dm-devel] [RFC PATCH 1/4] libmultipath: don't bother to reset default timeout value

2023-07-28 Thread Benjamin Marzinski
ice), then there's no reason to reset the default value, since that can't have changed. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 5626d48d..2b1a11d5 100

Re: [dm-devel] [PATCH] libmultipath: dm_get_maps(): remove spurious assignment

2023-07-06 Thread Benjamin Marzinski
> before it can be > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/devmapper.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c > index a49db3b..248c373 100644 > --- a/libmu

Re: [dm-devel] [PATCH v2] libmultipath: ignore nvme devices if nvme native multipath is enabled

2023-07-06 Thread Benjamin Marzinski
-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/blacklist.c | 35 --- > tests/Makefile | 1 - > tests/blacklist.c| 13 +++-- > 3 files changed, 43 insertions(+), 6 deletions(-) > >

Re: [dm-devel] [PATCH] libmultipath: ignore nvme devices if nvme native multipath is enabled

2023-06-30 Thread Benjamin Marzinski
On Fri, Jun 30, 2023 at 08:14:07PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If the nvme native multipath driver is enabled, blacklist nvme devices > for dm-multipath by default. This is particularly useful with > "find_multipaths greedy". > > Signed-off-by: Martin Wilck This

Re: [dm-devel] [PATCH] multipath-tools Consider making 'smart' the default

2023-06-30 Thread Benjamin Marzinski
On Mon, Jun 26, 2023 at 03:11:30PM +0200, Martin Wilck wrote: > On Tue, 2023-03-21 at 09:57 +0100, Martin Wilck wrote: > > On Mon, 2023-03-20 at 14:41 -0500, Benjamin Marzinski wrote: > > > On Mon, Mar 20, 2023 at 03:18:37PM +0100, Martin Wilck wrote: > > > > On

[dm-devel] [PATCH V3 10/11] multipathd: reload map if the path groups are out of order

2023-06-07 Thread Benjamin Marzinski
. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 70 +++ 1 file changed, 58 insertions(+), 12 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index f603d143..584be895 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -395,11

[dm-devel] [PATCH V3 11/11] multipathd: don't assume mpp->paths will exist in need_switch_pathgroup

2023-06-07 Thread Benjamin Marzinski
one or none. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index 584be895..6463d2b7 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -439,7 +43

[dm-devel] [PATCH V3 09/11] multipathd: only refresh priorities in update_prio()

2023-06-07 Thread Benjamin Marzinski
before starting the deferred failback count, it's no longer necessary to update them all again when the failback timeout expires. The checker loop will continue to update them correctly while the timeout is going on. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd

[dm-devel] [PATCH V3 08/11] multipath-tools tests: add tests to verify PRIO_UNDEF changes

2023-06-07 Thread Benjamin Marzinski
Make sure that pathgroups that include paths with a PRIO_UNDEF priority are properly sorted. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/tests/pgpolicy.c b/tests

[dm-devel] [PATCH V3 07/11] libmultipath: don't count PRIO_UNDEF paths for pathgroup priority

2023-06-07 Thread Benjamin Marzinski
. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/switchgroup.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libmultipath/switchgroup.c b/libmultipath/switchgroup.c index 6fdfcfa7..b1e1f39b 100644 --- a/libmultipath/switchgroup.c +++ b

[dm-devel] [PATCH V3 06/11] libmultipath: add "detect_pgpolicy_use_tpg" config option

2023-06-07 Thread Benjamin Marzinski
If this and "detect_pgpolicy" are both selected and ALUA is autodetected, the multipath device will use the "group_by_tpg" policy instead of the "group_by_prio" policy. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 2 ++ libmulti

[dm-devel] [PATCH V3 05/11] libmultipath: add "detect_pgpolicy" config option

2023-06-07 Thread Benjamin Marzinski
This allows configuations to use "group_by_prio" if alua is autodetected and another policy if it isn't, so they can work with detect_prio. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 2 ++ libmultipath/config.h | 2 ++ li

[dm-devel] [PATCH V3 03/11] libmultipath: add ALUA tpg path wildcard

2023-06-07 Thread Benjamin Marzinski
Make it possible to easily check a path's target port group. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libmultipath/print.c b/libmultipath/print.c index 3193dbe0..360308d2 100644

[dm-devel] [PATCH V3 04/11] multipath-tools tests: add tests for group_by_tpg policy

2023-06-07 Thread Benjamin Marzinski
Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 201 +++ 1 file changed, 201 insertions(+) diff --git a/tests/pgpolicy.c b/tests/pgpolicy.c index 43be831f..85fa30ce 100644 --- a/tests/pgpolicy.c +++ b/tests

[dm-devel] [PATCH V3 02/11] libmultipath: don't copy pgpolicy string in get_pgpolicy_name

2023-06-07 Thread Benjamin Marzinski
copying the value into a passed in buffer doesn't help any of the callers of this function. It's just wasted work. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c | 6 +- libmultipath/pgpolicies.c | 27 --- libmultipath

[dm-devel] [PATCH V3 01/11] libmultipath: add group_by_tpg path_grouping_policy

2023-06-07 Thread Benjamin Marzinski
by this policy won't always match with those chosen by group_by_prio, since it is possible for multiple ALUA target port groups to have the same priority. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 1 + libmultipath/pgpolicies.c| 19

[dm-devel] [PATCH V3 00/11] multipath: Add a group_by_tgp pgpolicy

2023-06-07 Thread Benjamin Marzinski
[10/11]: fixed logic in path_groups_in_order() Benjamin Marzinski (11): libmultipath: add group_by_tpg path_grouping_policy libmultipath: don't copy pgpolicy string in get_pgpolicy_name libmultipath: add ALUA tpg path wildcard multipath-tools tests: add tests for group_by_tpg pol

Re: [dm-devel] [PATCH V2 10/11] multipathd: reload map if the path groups are out of order

2023-06-07 Thread Benjamin Marzinski
On Wed, Jun 07, 2023 at 06:59:21PM +, Martin Wilck wrote: > On Tue, 2023-06-06 at 15:13 -0500, Benjamin Marzinski wrote: > > need_switch_pathgroup() only checks if the currently used pathgroup > > is > > not the highest priority pathgroup. If it isn't, all multipathd doe

Re: [dm-devel] [PATCH V2 01/11] libmultipath: add group_by_tpg path_grouping_policy

2023-06-07 Thread Benjamin Marzinski
On Wed, Jun 07, 2023 at 06:31:19PM +, Martin Wilck wrote: > On Tue, 2023-06-06 at 15:13 -0500, Benjamin Marzinski wrote: > >  #endif > > diff --git a/libmultipath/prioritizers/alua.c > > b/libmultipath/prioritizers/alua.c > > index 0ab06e2b..4888a974 100644 > >

[dm-devel] [PATCH V2 09/11] multipathd: only refresh priorities in update_prio()

2023-06-06 Thread Benjamin Marzinski
before starting the deferred failback count, it's no longer necessary to update them all again when the failback timeout expires. The checker loop will continue to update them correctly while the timeout is going on. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 8

[dm-devel] [PATCH V2 07/11] libmultipath: don't count PRIO_UNDEF paths for pathgroup priority

2023-06-06 Thread Benjamin Marzinski
. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/switchgroup.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libmultipath/switchgroup.c b/libmultipath/switchgroup.c index 6fdfcfa7..b1e1f39b 100644 --- a/libmultipath/switchgroup.c +++ b

[dm-devel] [PATCH V2 08/11] multipath-tools tests: add tests to verify PRIO_UDEF changes

2023-06-06 Thread Benjamin Marzinski
Make sure that pathgroups that include paths with a prio_UNDEF priority are properly sorted. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/tests/pgpolicy.c b/tests

[dm-devel] [PATCH V2 11/11] multipathd: don't assume mpp->paths will exist in need_switch_pathgroup

2023-06-06 Thread Benjamin Marzinski
one or none. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index 05c74e9e..539cff54 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -438,7 +43

[dm-devel] [PATCH V2 10/11] multipathd: reload map if the path groups are out of order

2023-06-06 Thread Benjamin Marzinski
. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 69 ++- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index f603d143..05c74e9e 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -395,11

[dm-devel] [PATCH V2 02/11] libmultipath: don't copy pgpolicy string in get_pgpolicy_name

2023-06-06 Thread Benjamin Marzinski
copying the value into a passed in buffer doesn't help any of the callers of this function. It's just wasted work. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c | 6 +- libmultipath/pgpolicies.c | 27 --- libmultipath

[dm-devel] [PATCH V2 05/11] libmultipath: add "detect_pgpolicy" config option

2023-06-06 Thread Benjamin Marzinski
This allows configuations to use "group_by_prio" if alua is autodetected and another policy if it isn't, so they can work with detect_prio. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 2 ++ libmultipath/config.h | 2 ++ libmultipath/configur

[dm-devel] [PATCH V2 06/11] libmultipath: add "detect_pgpolicy_use_tpg" config option

2023-06-06 Thread Benjamin Marzinski
If this and "detect_pgpolicy" are both selected and ALUA is autodetected, the multipath device will use the "group_by_tpg" policy instead of the "group_by_prio" policy. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 2 ++ libmulti

[dm-devel] [PATCH V2 04/11] multipath-tools tests: add tests for group_by_tpg policy

2023-06-06 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 201 +++ 1 file changed, 201 insertions(+) diff --git a/tests/pgpolicy.c b/tests/pgpolicy.c index 43be831f..85fa30ce 100644 --- a/tests/pgpolicy.c +++ b/tests/pgpolicy.c @@ -32,6 +32,15

[dm-devel] [PATCH V2 03/11] libmultipath: add ALUA tpg path wildcard

2023-06-06 Thread Benjamin Marzinski
Make it possible to easily check a path's target port group. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libmultipath/print.c b/libmultipath/print.c index 3193dbe0..360308d2 100644

[dm-devel] [PATCH V2 01/11] libmultipath: add group_by_tpg path_grouping_policy

2023-06-06 Thread Benjamin Marzinski
by this policy won't always match with those chosen by group_by_prio, since it is possible for multiple ALUA target port groups to have the same priority. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 1 + libmultipath/pgpolicies.c| 19

[dm-devel] [PATCH V2 00/11] multipath: Add a group_by_tgp pgpolicy

2023-06-06 Thread Benjamin Marzinski
tin [10/11]: This just moves path_groups_in_order() to multiapthd, and adds a comment explaining why it works different from select_path_group(). Benjamin Marzinski (11): libmultipath: add group_by_tpg path_grouping_policy libmultipath: don't copy pgpolicy string in get_pgp

Re: [dm-devel] [PATCH 4/5] multipathd: reload map if the path groups are out of order

2023-06-06 Thread Benjamin Marzinski
On Tue, Jun 06, 2023 at 04:32:13PM +, Martin Wilck wrote: > On Tue, 2023-06-06 at 10:54 -0500, Benjamin Marzinski wrote: > > On Tue, Jun 06, 2023 at 02:55:27PM +, Martin Wilck wrote: > > > On Mon, 2023-06-05 at 23:42 -0500, Benjamin Marzinski wrote: > > > >

Re: [dm-devel] multipath-tools: Debian patches

2023-06-06 Thread Benjamin Marzinski
On Tue, Jun 06, 2023 at 05:18:36PM +0200, Martin Wilck wrote: > On Mon, 2023-06-05 at 21:59 +0200, Xose Vazquez Perez wrote: > > Hi, > > > > I have no Debian salsa account, so I reply here, trying to reach Chris > via email. > > > > > A complaint about upstream, "Remove library development

Re: [dm-devel] [PATCH 4/5] multipathd: reload map if the path groups are out of order

2023-06-06 Thread Benjamin Marzinski
On Tue, Jun 06, 2023 at 02:55:27PM +, Martin Wilck wrote: > On Mon, 2023-06-05 at 23:42 -0500, Benjamin Marzinski wrote: > > On Mon, Jun 05, 2023 at 02:08:07PM -0500, Benjamin Marzinski wrote: > > > On Wed, May 31, 2023 at 04:27:30PM +, Martin Wilck wrote: > > >

  1   2   3   4   5   6   7   8   9   10   >