Re: [PATCH 6/6] libmpathutil: remove systemd_service_enabled()

2023-10-25 Thread Benjamin Marzinski
isn't using socket activation, and multipathd is temporarily down, and a new device appears, it will always be marked as not claimed by multipath. This could cause the device to be grabbed by LVM, and not multipathed. This is probably just may paranoia talking, since the chance of

Re: [PATCH v2 02/14] libmultipath: directio: don't reset ct->running after io_cancel()

2023-10-27 Thread Benjamin Marzinski
running, or freeing the > memory, before io_getevents() has indicated that the request is finished. > > In the test code, don't bother about the return value of __wrap_io_cancel(). > > Signed-off-by: Martin Wilck > Reviewed-by: Hannes Reinecke Reviewed-by: Benjamin Marzinski

Re: [PATCH v2 03/14] libmultipath: directio: fix error handling

2023-10-27 Thread Benjamin Marzinski
; > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/checkers/directio.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/libmultipath/checkers/directio.c > b/libmultipath/checkers/directio.c

Re: [PATCH v2 04/14] libmultipath: io_err_stat: don't free aio memory before completion

2023-10-27 Thread Benjamin Marzinski
e whether an io event > has been completed by the kernel. Make sure no in-flight buffers are freed. > > Fixes https://github.com/opensvc/multipath-tools/issues/73. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > Cc: Li Xiao Keng > Cc: Miao Guanqin > C

Re: [PATCH v2 05/14] libmultipath: io_err_stat: call io_destroy() inside free_io_err_pathvec()

2023-10-27 Thread Benjamin Marzinski
o() code path (note that total_time is at least > 2 * IO_TIMEOUT_SEC). In the failure case of enqueue_io_err_stat_by_path(), no > IO has been submitted yet. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > Cc: Li Xiao Keng > Cc: Miao Guanqin > Cc:

Re: [PATCH v2 06/14] libmultipath: io_err_stat: use higher number of aio slots

2023-10-27 Thread Benjamin Marzinski
t NR_IOSTAT_PATHS=32 paths at the same time. This is not an upper > limit, because kernel IOCBs can be reused between paths. > > Increase the log levels of io_setup and io_submit to make it sure > we catch problems with this approach. > > Signed-off-by: Martin Wilck Reviewed-by:

Re: [PATCH v2 07/14] libmultipath: io_err_stat: fix error handling

2023-10-27 Thread Benjamin Marzinski
n io_err_stat.c. Don't print an error message > for failure of io_cancel(), which always returns -EINPRPOGRESS. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/io_err_stat.c | 36 > 1 file changed, 16 in

Re: [PATCH v2 08/14] multipathd.service: require modprobe@dm_multipath.service if available

2023-10-27 Thread Benjamin Marzinski
.d. Use it > if the detected systemd version support it. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > Makefile.inc | 4 +++- > multipath/Makefile

Re: [PATCH v2 10/14] multipath.conf.5: fix typo

2023-10-27 Thread Benjamin Marzinski
On Thu, Oct 26, 2023 at 07:41:49PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipath/multipath.conf.5.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/multipa

Re: [PATCH v2 11/14] Makefile.inc, README.md: fix docs for prefix in split-usr case

2023-10-27 Thread Benjamin Marzinski
case. Also, slightly > improve the paragraph about SCSI module loading. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > Cc: Xose Vazquez Perez > --- > Makefile.inc | 6 -- > README.md| 25 ++--- > 2 files changed, 22 ins

Re: [PATCH v2 12/14] README.md: update mailing list and contributing information

2023-10-27 Thread Benjamin Marzinski
ing list archives are available on > +[lore.kernel.org](https://lore.kernel.org/dm-devel/) and > +[marc.info](https://marc.info/?l=dm-devel). See also the > +[lists.linux.dev home > page](https://subspace.kernel.org/lists.linux.dev.html). > + > +When sending patches to the mailing list, l

Re: [PATCH v2 13/14] README.md: Extend the section about NVMe

2023-10-27 Thread Benjamin Marzinski
On Thu, Oct 26, 2023 at 07:41:52PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > Cc: Xose Vazquez Perez > --- > README.md | 30 -- > 1 file changed, 20 insertions(+), 10 d

Re: [PATCH v2 14/14] README.md: fix formatting of Changelog section

2023-10-27 Thread Benjamin Marzinski
On Thu, Oct 26, 2023 at 07:41:53PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > Cc: Xose Vazquez Perez > --- > README.md | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --

Re: [PATCH v2 08/14] multipathd.service: require modprobe@dm_multipath.service if available

2023-10-27 Thread Benjamin Marzinski
On Thu, Oct 26, 2023 at 07:41:47PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > systemd v245 and newer provides the modprobe@.service unit, which > can be used to pull in modules via systemd. This is cleaner than > loading dm-multipath unconditionally via modules-load.d. Use it > if the

[PATCH 2/7] libmutipath: Retain device size if sysfs_get_size fails.

2023-11-02 Thread Benjamin Marzinski
e. Signed-off-by: Benjamin Marzinski --- libmultipath/sysfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c index c45296af..ad3d6612 100644 --- a/libmultipath/sysfs.c +++ b/libmultipath/sysfs.c @@ -175,7 +175,6 @@ sysfs_get_size (struct path *pp

[PATCH 3/7] multipathd: check and update all paths when in cli_resize

2023-11-02 Thread Benjamin Marzinski
When resizing a multipath device, make sure that all the paths have been updated to the new size first. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/multipathd/cli_handlers.c

[PATCH 7/7] libmultipath.version: bump ABI version to 22.0.0

2023-11-02 Thread Benjamin Marzinski
Commits ("libmultipath: Add max_retries config option") and ("multipathd: Add auto_resize config option") changed the size and member offsets of multiple structs. Signed-off-by: Benjamin Marzinski --- libmultipath/libmultipath.version | 2 +- 1 file changed, 1 insertion(+),

[PATCH 4/7] multipathd: move post-reloading commands into resize_map()

2023-11-02 Thread Benjamin Marzinski
In preparation for reusing resize_map() in other code, move all code necessary to resize the map to the resize_map() function. Also track if map was removed in the function. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 16 +--- 1 file changed, 9 insertions(+), 7

[PATCH 5/7] multipathd: move resize_map() to multipathd/main.c

2023-11-02 Thread Benjamin Marzinski
No functional changes. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 29 - multipathd/main.c | 29 + multipathd/main.h | 2 ++ 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/multipathd

[PATCH 0/7] Two multipath features.

2023-11-02 Thread Benjamin Marzinski
cally resize a device, if it sees that all of its path devices have been resized. By default it is set to "never" and multipath behaves like it always has, where users need to manually resize multipath devices after all the paths have been resized. Benjamin Marzinski (7): libmultipath:

[PATCH 1/7] libmultipath: Add max_retries config option

2023-11-02 Thread Benjamin Marzinski
other path sooner. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 3 +++ libmultipath/config.h | 3 +++ libmultipath/dict.c | 34 libmultipath/discovery.c | 42 ++- libmultipath/prop

[PATCH 6/7] multipathd: Add auto_resize config option

2023-11-02 Thread Benjamin Marzinski
: Benjamin Marzinski --- libmultipath/config.c | 2 ++ libmultipath/config.h | 3 +++ libmultipath/configure.c | 1 + libmultipath/defaults.h | 1 + libmultipath/dict.c | 48 +++ libmultipath/dict.h | 1 + libmultipath

Re: [PATCH 3/7] multipathd: check and update all paths when in cli_resize

2023-11-08 Thread Benjamin Marzinski
On Wed, Nov 08, 2023 at 05:56:42PM +, Martin Wilck wrote: > On Thu, 2023-11-02 at 18:15 -0400, Benjamin Marzinski wrote: > > When resizing a multipath device, make sure that all the paths have > > been updated to the new size first. > > > > Signed

Re: [PATCH 1/7] libmultipath: Add max_retries config option

2023-11-08 Thread Benjamin Marzinski
On Wed, Nov 08, 2023 at 03:36:14PM +, Martin Wilck wrote: > On Thu, 2023-11-02 at 18:15 -0400, Benjamin Marzinski wrote: > > This option lets multipath set a scsi disk's max_retries sysfs value. > > Setting this can be helpful for cases where the path checker > > suc

Re: [PATCH 6/7] multipathd: Add auto_resize config option

2023-11-08 Thread Benjamin Marzinski
On Wed, Nov 08, 2023 at 06:07:35PM +, Martin Wilck wrote: > On Thu, 2023-11-02 at 18:15 -0400, Benjamin Marzinski wrote: > > This option gives multipathd the ability to automatically resize a > > device when it detects that all of the path devices have changed. By > >

Re: [PATCH 7/7] libmultipath.version: bump ABI version to 22.0.0

2023-11-08 Thread Benjamin Marzinski
On Wed, Nov 08, 2023 at 06:10:26PM +, Martin Wilck wrote: > On Thu, 2023-11-02 at 18:15 -0400, Benjamin Marzinski wrote: > > Commits ("libmultipath: Add max_retries config option") and > > ("multipathd: Add auto_resize config option") changed the size and >

Re: [PATCH 1/7] libmultipath: Add max_retries config option

2023-11-09 Thread Benjamin Marzinski
On Thu, Nov 09, 2023 at 09:07:23AM +, Martin Wilck wrote: > Hi Ben, > > On Wed, 2023-11-08 at 17:08 -0500, Benjamin Marzinski wrote: > > On Wed, Nov 08, 2023 at 03:36:14PM +, Martin Wilck wrote: > > > On Thu, 2023-11-02 at 18:15 -0400, Benjamin Marzinski wrote:

[PATCH v2 4/6] multipathd: move post-reloading commands into resize_map()

2023-11-09 Thread Benjamin Marzinski
In preparation for reusing resize_map() in other code, move all code necessary to resize the map to the resize_map() function. Also track if map was removed in the function. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 16 +--- 1 file

[PATCH v2 0/6] Two multipath features.

2023-11-09 Thread Benjamin Marzinski
ge. Fixed whitespace issue 7/7: removed Benjamin Marzinski (6): libmultipath: Add max_retries config option libmutipath: Retain device size if sysfs_get_size fails. multipathd: check and update all paths when in cli_resize multipathd: move post-reloading commands into resize_map() mu

[PATCH v2 2/6] libmutipath: Retain device size if sysfs_get_size fails.

2023-11-09 Thread Benjamin Marzinski
sting size. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/sysfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c index c45296af..ad3d6612 100644 --- a/libmultipath/sysfs.c +++ b/libmultipath/sysfs.c @@ -175,7 +175,6 @@ sysf

[PATCH v2 5/6] multipathd: move resize_map() to multipathd/main.c

2023-11-09 Thread Benjamin Marzinski
No functional changes. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 29 - multipathd/main.c | 29 + multipathd/main.h | 2 ++ 3 files changed, 31 insertions(+), 29 deletions

[PATCH v2 3/6] multipathd: check and update all paths when in cli_resize

2023-11-09 Thread Benjamin Marzinski
When resizing a multipath device, make sure that all the paths have been updated to the new size first. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/multipathd/cli_handlers.c

[PATCH v2 6/6] multipathd: Add auto_resize config option

2023-11-09 Thread Benjamin Marzinski
: Benjamin Marzinski --- libmultipath/config.h | 1 + libmultipath/defaults.h | 1 + libmultipath/dict.c | 38 +++ libmultipath/dict.h | 1 + libmultipath/structs.h| 7 +++ multipath/multipath.conf.5.in | 15

[PATCH v2 1/6] libmultipath: Add max_retries config option

2023-11-09 Thread Benjamin Marzinski
other path sooner. Signed-off-by: Benjamin Marzinski --- libmultipath/config.h | 1 + libmultipath/dict.c | 25 + libmultipath/discovery.c | 41 ++- libmultipath/structs.h| 6 + multipath/multipath.conf.5.in

[PATCH 1/2] Makefile.inc: always use /usr/share/man for mandir

2023-11-10 Thread Benjamin Marzinski
The current build system, with nothing overridden, will install the man pages in /share/man, which AFAIK isn't correct for any distribution. Signed-off-by: Benjamin Marzinski --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc

[PATCH 2/2] Makefile.inc: always use /usr/include for includedir

2023-11-10 Thread Benjamin Marzinski
The current build system, with nothing overridden, will install the header files to /include, which AFAIK isn't correct for any distribution. Signed-off-by: Benjamin Marzinski --- Makefile.inc | 3 +-- create-config.mk | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --

[PATCH 0/2] Makefile cleanups.

2023-11-10 Thread Benjamin Marzinski
Two small, and I hope sensible, changes to Makefile.inc Benjamin Marzinski (2): Makefile.inc: always use /usr/share/man for mandir Makefile.inc: always use /usr/include for includedir Makefile.inc | 5 ++--- create-config.mk | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions

Re: [PATCH] multipath-tools: set usr_prefix to /usr in default configuration

2023-11-16 Thread Benjamin Marzinski
ix default to > /usr in (the default) case where prefix is empty, and set it equal > to /prefix otherwise. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > > This is submitted as an alternative approach to Ben Marzinski's > late patch set

[PATCH] multipathd: Make sure to disable queueing if recovery has failed.

2023-11-27 Thread Benjamin Marzinski
paths. To fix this, in set_no_path_retry(), if no_path_retry is set to a number and the device is queueing but it is in recovery mode and out of retries with no usable paths, manually disable queue_if_no_path. Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 12 +++- 1

Re: [PATCH] multipathd: Make sure to disable queueing if recovery has failed.

2023-11-28 Thread Benjamin Marzinski
disable queuing when it shouldn't, please let me know. -Ben > > > On Tue, Nov 28, 2023 at 11:13 AM Benjamin Marzinski > wrote: > > > > On Mon, Nov 27, 2023 at 04:07:46PM -0600, Roger Heflin wrote: > > > How long does recovery take? I am unclear on

Re: [PATCH] multipathd: Make sure to disable queueing if recovery has failed.

2023-12-04 Thread Benjamin Marzinski
On Mon, Dec 04, 2023 at 03:38:03PM +0100, Martin Wilck wrote: > On Mon, 2023-11-27 at 16:54 -0500, Benjamin Marzinski wrote: > > If a multipath device has no_path_retry set to a number and has lost > > all > > paths, gone into recovery mode, and timed out, it will disable

Re: [PATCH] multipathd: Make sure to disable queueing if recovery has failed.

2023-12-04 Thread Benjamin Marzinski
On Mon, Dec 04, 2023 at 09:43:58PM +0100, Martin Wilck wrote: > On Mon, 2023-12-04 at 15:00 -0500, Benjamin Marzinski wrote: > > On Mon, Dec 04, 2023 at 03:38:03PM +0100, Martin Wilck wrote: > > > On Mon, 2023-11-27 at 16:54 -0500, Benjamin Marzinski wrote: > > >

Re: [PATCH] multipathd: Make sure to disable queueing if recovery has failed.

2023-12-05 Thread Benjamin Marzinski
On Tue, Dec 05, 2023 at 03:57:13PM +0100, Martin Wilck wrote: > On Mon, 2023-12-04 at 18:01 -0500, Benjamin Marzinski wrote: > > On Mon, Dec 04, 2023 at 09:43:58PM +0100, Martin Wilck wrote: > > > On Mon, 2023-12-04 at 15:00 -0500, Benjamin Marzinski wrote: > > > >

Re: [PATCH v2 1/5] multipathd: Make sure to disable queueing if recovery has failed.

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 04:11:32PM +0100, Martin Wilck wrote: > On Tue, 2023-12-05 at 18:57 -0500, Benjamin Marzinski wrote: > > If a multipath device has no_path_retry set to a number and has lost > > all > > paths, gone into recovery mode, and timed out, it will disable

Re: [PATCH v2 5/5] multipathd: force setting dm state when disabling/restoring queueing

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 05:15:20PM +0100, Martin Wilck wrote: > On Tue, 2023-12-05 at 18:57 -0500, Benjamin Marzinski wrote: > > Currently, the interactive commands to disable and restore queueing > > call > > set_no_path_retry() without first re-reading the device table. Th

Re: [PATCH v2 2/5] multipathd: don't modify the multipath device on show commands

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 05:15:39PM +0100, Martin Wilck wrote: > On Tue, 2023-12-05 at 18:57 -0500, Benjamin Marzinski wrote: > > The commands to show a multipath device are supposed to return its > > current state without updating it. Even when reset is 0, > > update_multipa

Re: [PATCH v2 4/5] multipathd: cleanup __setup_multipath

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 05:15:44PM +0100, Martin Wilck wrote: > On Tue, 2023-12-05 at 18:57 -0500, Benjamin Marzinski wrote: > > split __setup_multipath() into two functions: refresh_multipath(), > > that > > updates the table and status, and setup_multipath(), which works a

Re: [PATCH] multipath-tools: update ml

2023-12-15 Thread Benjamin Marzinski
On Sat, Dec 16, 2023 at 12:32:46AM +0100, Xose Vazquez Perez wrote: > Cc: Martin Wilck > Cc: Benjamin Marzinski > Cc: Christophe Varoqui > Cc: DM-DEVEL ML > Signed-off-by: Xose Vazquez Perez > --- > libdmmp/docs/man/libdmmp.h.3 | 2 +- > libmultipath/hwtable.c |

Re: [PATCH 03/16] multipathd: disable queueing when removing unknown maps

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 05:41:12PM +0100, Martin Wilck wrote: > On Tue, 2023-12-12 at 18:53 -0500, Benjamin Marzinski wrote: > > Make cli_del_maps() call dm_suspend_and_flush_map() for the unknown > > multipath devices as well. > > > > Signed-off-by: Benjamin Marzins

Re: [PATCH 10/16] libmultipath: print error when find_mp_by_str() fails.

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 06:08:23PM +0100, Martin Wilck wrote: > On Tue, 2023-12-12 at 18:53 -0500, Benjamin Marzinski wrote: > > None of the callers of find_mp_by_str() print any message if they > > fail > > because the map name is invalid. Print one in find_mp_by_str() to &g

Re: [PATCH 07/16] multipathd: always start failure replies with "fail\n"

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 06:08:34PM +0100, Martin Wilck wrote: > On Tue, 2023-12-12 at 18:53 -0500, Benjamin Marzinski wrote: > > When multipathd interactive commands fail for certain reasons, like > > timing out or incorrect permissions, they do not reply with "fail\n".

Re: [PATCH 12/16] multipathd: make cli_handlers check for paths by dev and devt

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 06:17:18PM +0100, Martin Wilck wrote: > On Tue, 2023-12-12 at 18:53 -0500, Benjamin Marzinski wrote: > > Some of the client handlers checked for paths by both dev and devt, > > but > > not all. Also, many of the client handlers don't print anything

Re: [PATCH 14/16] libdmmp: handle failures in _process_cmd

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 06:23:19PM +0100, Martin Wilck wrote: > On Tue, 2023-12-12 at 18:53 -0500, Benjamin Marzinski wrote: > > currently, most of the callers of _process_cmd() do not gracefully > > handle the case where multipathd returns "fail\n". dmmp_flush_mpath() &g

Re: [PATCH 16/16] multipath: Don't always retry deletgated remove failures

2023-12-15 Thread Benjamin Marzinski
On Thu, Dec 14, 2023 at 06:26:58PM +0100, Martin Wilck wrote: > On Tue, 2023-12-12 at 18:53 -0500, Benjamin Marzinski wrote: > > Now that multipathd is running the same code to remove devices as > > multipath, multipath doesn't need to automatically retry the remove

[PATCH v3 2/5] multipathd: Make sure to disable queueing if recovery has failed.

2023-12-19 Thread Benjamin Marzinski
usable paths. To fix this, in set_no_path_retry(), if no_path_retry is set to a number and the device is queueing but it is in recovery mode and out of retries with no usable paths, manually disable queue_if_no_path. Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 26

[PATCH v3 1/5] libmultipath: avoid temporarily enabling queueing on reload

2023-12-19 Thread Benjamin Marzinski
the reload. Signed-off-by: Benjamin Marzinski --- libmultipath/dmparser.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c index 3b37a926..3d85e6ee 100644 --- a/libmultipath/dmparser.c +++ b/libmultipath

[PATCH v3 0/5] fix set_no_path_retry and cleanup commands

2023-12-19 Thread Benjamin Marzinski
path(). patches 0002-0005 were previously 0001-0004 Benjamin Marzinski (4): multipathd: Make sure to disable queueing if recovery has failed. multipathd: don't modify the multipath device on show commands libmultipath: keep track of queueing state in features multipathd: only restor

[PATCH v3 4/5] libmultipath: keep track of queueing state in features

2023-12-19 Thread Benjamin Marzinski
Make multipathd update mpp->features when in enables or disables queuing. This patch handles all the cases except failed removes by dm_suspend_and_flush_map(), which is never called by multipathd. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 4 +--- libmultip

[PATCH v3 3/5] multipathd: don't modify the multipath device on show commands

2023-12-19 Thread Benjamin Marzinski
setup_multipath() from update_multipath(). Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 10 +- multipathd/dmevents.c | 2 +- multipathd/main.c | 25 ++--- multipathd/main.h | 7 +++ multipathd/waiter.c | 2 +- 5

[PATCH v3 5/5] multipathd: only restore queueing if it has been disabled first

2023-12-19 Thread Benjamin Marzinski
Make the restorequeueing command only do something if disablequeueing has first been run on the map. Also update the man page to explain what restorequeuing actually does. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 40 -- multipathd

[PATCH] multipath-tools tests: fix dmevents test after update_multipath change

2023-12-19 Thread Benjamin Marzinski
The commit ("multipathd: don't modify the multipath device on show commands") changed the paramters for update_multipath(). Update the test to match. Signed-off-by: Benjamin Marzinski --- tests/dmevents.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tes

[PATCH v2 00/18] change how multipathd deletes maps plus cleanups

2024-01-03 Thread Benjamin Marzinski
ion. 0018: New patch to deal with a issue caused by the change to track the queue_if_no_path state in mpp->features, from my previous patchset. Benjamin Marzinski (18): multipathd: remove nopath flushing code from flush_map() multipathd: make flush_map() delete maps like the m

[PATCH v2 05/18] libmultipath: make _dm_flush_map() return an enum

2024-01-03 Thread Benjamin Marzinski
A future patch will add an additional return code, so make this an enum instead of just using numbers. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 18 +- libmultipath/devmapper.h | 7 +++ multipath/main.c | 2

[PATCH v2 03/18] multipathd: disable queueing when removing unknown maps

2024-01-03 Thread Benjamin Marzinski
Make cli_del_maps() call dm_suspend_and_flush_map() for the unknown multipath devices as well. After this change, all callers of cli_del_maps() set need_suspend, so simplify dm_flush_maps(). Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 7 ++- libmultipath/devmapper.h

[PATCH v2 13/18] multipathd: add cli_handler reply message for missing devs

2024-01-03 Thread Benjamin Marzinski
When the cli_handlers cannot find the requested map or path, they will now return -ENODEV, which prints extra information in default_reply(). Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 56 --- multipathd

[PATCH v2 04/18] multipathd: simplify cli_del_map()

2024-01-03 Thread Benjamin Marzinski
do. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 23 ++- multipathd/main.c | 21 - multipathd/main.h | 1 - 3 files changed, 6 insertions(+), 39 deletions(-) diff --git a/multipathd

[PATCH v2 01/18] multipathd: remove nopath flushing code from flush_map()

2024-01-03 Thread Benjamin Marzinski
Instead of flush_map() handling both user requested flushes and automatic flushes when the last path has been deleted, make flush_map_nopaths() handle the automatic flushes itself, since a later patch will change the behavior of flush_map(). Reviewed-by: Martin Wilck Signed-off-by: Benjamin

[PATCH v2 06/18] libmultipath: make dm_remove_partmaps() a static function

2024-01-03 Thread Benjamin Marzinski
dm_remove_partmaps() is only used in devmapper.c, so make it static. It does need to be declared early, since remove_partmaps() and it call eachother. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 4 +++- libmultipath/devmapper.h | 2 -- 2 files

[PATCH v2 07/18] multipathd: always start failure replies with "fail\n"

2024-01-03 Thread Benjamin Marzinski
"fail\n", and adapt multipath and multipathc to return failure for any reply starting with "fail\n". Signed-off-by: Benjamin Marzinski --- libdmmp/libdmmp.c | 6 +++--- multipath/main.c| 13 ++--- multipathd/uxclnt.c | 9 +++-- multipathd/uxlsnr.c | 12 +--

[PATCH v2 08/18] multipathd: print extra default reply msg for busy devices

2024-01-03 Thread Benjamin Marzinski
If removing a multipath device fails because the device is in use, return DM_FLUSH_BUSY from remove_functions, which causes cli_del_map() to return -EBUSY, which will now print extra information in default_reply(). Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath

[PATCH v2 09/18] multipathd: handle busy devices in cli_del_maps()

2024-01-03 Thread Benjamin Marzinski
Make cli_del_maps() return -EBUSY like cli_del_map() if it fails because a device is in use and it doesn't run into any other type of failures. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 10 +++--- multipath/main.c

[PATCH v2 11/18] multipathd: don't open code find_mp_by_str() in client handers

2024-01-03 Thread Benjamin Marzinski
multiple client handlers simply open coded find_mp_by_str(). Just use the function instead. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 53 +-- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a

[PATCH v2 12/18] multipathd: make cli_handlers check for paths by dev and devt

2024-01-03 Thread Benjamin Marzinski
find a path, and can print out an error message if none is found. Signed-off-by: Benjamin Marzinski --- multipathd/cli_handlers.c | 40 --- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c

[PATCH v2 14/18] libdmmp: handle failures in _process_cmd

2024-01-03 Thread Benjamin Marzinski
using the appropriate DMMP error codes. Cc: Gris Ge Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libdmmp/libdmmp.c | 69 +++ 1 file changed, 28 insertions(+), 41 deletions(-) diff --git a/libdmmp/libdmmp.c b/libdmmp/libdmmp.c index 77f8a6a0

[PATCH v2 15/18] multipath: get rid of unnecessary retries variable

2024-01-03 Thread Benjamin Marzinski
the -R option can just set conf->remove_retries directly. It has the same effect. Signed-off-by: Benjamin Marzinski --- multipath/main.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/multipath/main.c b/multipath/main.c index 664f7b97..d3b46f3e 100644 --

[PATCH v2 18/18] multipathd: sync features on flush_map failure corner case

2024-01-03 Thread Benjamin Marzinski
If dm_suspend_and_flush_map() disables queueing on a device, and then fails both to flush the device and restore queueing, the device will still have queue_if_no_path set in mpp->features, but not in reality. Fix this. Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c

[PATCH v2 10/18] libmultipath: print error when find_mp_by_str() fails.

2024-01-03 Thread Benjamin Marzinski
None of the callers of find_mp_by_str() print any message if they fail because the map name is invalid. Print one in find_mp_by_str() to save the effort of adding it to all the callers. Signed-off-by: Benjamin Marzinski --- libmultipath/structs.c | 9 +++-- 1 file changed, 7 insertions

[PATCH v2 16/18] multipath: Don't locally retry deletgated remove failures

2024-01-03 Thread Benjamin Marzinski
Now that multipathd is running the same code to remove devices as multipath, multipath doesn't need to automatically retry the remove failures. Instead it now repeatedly calls delegate_to_multipathd() to handle any retries. Signed-off-by: Benjamin Marzinski --- multipath/main.c

[PATCH v2 02/18] multipathd: make flush_map() delete maps like the multipath command

2024-01-03 Thread Benjamin Marzinski
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 4a7e0ba1..6b66a5ee 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -788,7 +788,7 @@ sync_maps_state(vector mpvec)

[PATCH v2 17/18] multipath: if delegation times out mark as not delegated

2024-01-03 Thread Benjamin Marzinski
If either mpath_process_cmd fails with ETIMEDOUT or the reply is "fail\ntimeout\n", failback to multipath local commands. Signed-off-by: Benjamin Marzinski --- multipath/main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/multipath/main.c b/multipath/main.c index 83dca8c0

Re: [PATCH] libmultipath: fix ANA prioritizer enablement logic

2024-01-04 Thread Benjamin Marzinski
On Thu, Jan 04, 2024 at 12:07:32PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Fixes: 3e71d8a ("multipath-tools Makefiles: create config.mk") > > Suggested-by: Lidong Zhong > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- >

Re: [PATCH 0/3] multipath-tools: coverity defect fixes

2024-01-05 Thread Benjamin Marzinski
On Fri, Jan 05, 2024 at 07:40:33PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Fixes for defects reported by coverity (new defects in old code). > So far I haven't had time to test them thoroughly. For the set: Reviewed-by: Benjamin Marzinski > > Martin Wi

Multipath bootup failure

2024-01-12 Thread Benjamin Marzinski
Booting a machine with a multipathed kpartx root device fails for me using the fedora rawhide multipath packages, which are based on the 0.9.7 release. Using LVM on top works. The issue is that when the root device is directly on a partition, dracut finds it on one of the path devices, and starts u

Re: Multipath bootup failure

2024-01-15 Thread Benjamin Marzinski
On Mon, Jan 15, 2024 at 01:06:56PM +0100, Martin Wilck wrote: > > I've tested adding > > > > Before=systemd-udev-trigger.service > > > > to multipathd.sevice with no failures so far.  This requires fixing > > multipathd-configure.service, so that there aren't any dependency > > conflicts, but tha

[PATCH 0/2] Fix auto resize code

2024-01-15 Thread Benjamin Marzinski
Fix to bugs in my auto-resize feature. Benjamin Marzinski (2): multipathd: fix null pointer dereference in uev_update_path multipathd: fix auto-resize configuration libmultipath/defaults.h | 1 - libmultipath/structs.h | 3 +-- multipathd/main.c | 2 +- 3 files changed, 2 insertions

[PATCH 2/2] multipathd: fix auto-resize configuration

2024-01-15 Thread Benjamin Marzinski
y is the default. Fixes: 981b83ad1 ("multipathd: Add auto_resize config option") Signed-off-by: Benjamin Marzinski --- libmultipath/defaults.h | 1 - libmultipath/structs.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libmultipath/defaults.h b/libmultipath/default

[PATCH 1/2] multipathd: fix null pointer dereference in uev_update_path

2024-01-15 Thread Benjamin Marzinski
The Auto-resize code added a check that deferences pp->mpp without checking that it's non-NULL. Fix it. Fixes: 981b83ad1 ("multipathd: Add auto_resize config option") Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH 2/2] multipathd: fix auto-resize configuration

2024-01-16 Thread Benjamin Marzinski
On Tue, Jan 16, 2024 at 12:23:33PM +0100, Martin Wilck wrote: > On Tue, 2024-01-16 at 02:05 -0500, Benjamin Marzinski wrote: > > The code acted like AUTO_RESIZE_UNDEFINED didn't exist, but since > > conf->auto_resize was never set to AUTO_RESIZE_NEVER, the defa

[PATCH v2 0/2] Fix auto resize code

2024-01-16 Thread Benjamin Marzinski
Fix two bugs in my auto-resize feature. changes from v1 (based on suggestions from Martin Wilck): 0002: Explicitly set the default values of auto_resize Benjamin Marzinski (2): multipathd: fix null pointer dereference in uev_update_path multipathd: fix auto-resize configuration

[PATCH v2 1/2] multipathd: fix null pointer dereference in uev_update_path

2024-01-16 Thread Benjamin Marzinski
The Auto-resize code added a check that deferences pp->mpp without checking that it's non-NULL. Fix it. Fixes: 981b83ad1 ("multipathd: Add auto_resize config option") Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v2 2/2] multipathd: fix auto-resize configuration

2024-01-16 Thread Benjamin Marzinski
esize tp AUTO_RESIZE_NEVER. Fixes: 981b83ad1 ("multipathd: Add auto_resize config option") Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 1 + libmultipath/structs.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/config.c b/libmultip

Re: [PATCH] multipathd: the local path change is not considered

2024-01-18 Thread Benjamin Marzinski
On Thu, Jan 18, 2024 at 09:16:35AM +0100, Martin Wilck wrote: > On Wed, 2024-01-17 at 14:51 -0800, Brian Bunker wrote: > > When update_prio is called, there is a check to see if the local path > > has a priority change. Then all the remaining paths are simliarly > > checked. > > > > Only the resul

Re: [PATCH 0/2] multipath: update_prio fixes

2024-01-18 Thread Benjamin Marzinski
On Thu, Jan 18, 2024 at 12:47:12PM +0100, Martin Wilck wrote: > Reworked Brian's patch, and added a small cleanup on top. For the set: Reviewed-by: Benjamin Marzinski > > Brian Bunker (1): > multipathd: the local path change is not considered > > Martin Wilck (1

Re: [PATCH 3/7] md: test for MD_RECOVERY_DONE in stop_sync_thread

2024-01-22 Thread Benjamin Marzinski
On Mon, Jan 22, 2024 at 05:34:54PM +0100, Mikulas Patocka wrote: This test always hangs for me as well. You can try this for a reproducer Create a F39 Cloud image VM on a host machine (tweaking the root-ssh-key if necessary): # wget https://download.fedoraproject.org/pub/fedora/linux/releases/3

Re: [PATCH] multipathd: the sysfs prioritizer can return stale data

2024-01-30 Thread Benjamin Marzinski
On Tue, Jan 23, 2024 at 06:00:07PM -0800, Brian Bunker wrote: > When a path is lost and then reinstated later, the ALUA > device handler will not pick up this change and continue > to possibly provide incorrect (stale) information about > its ALUA state to the 'sysfs' prioritizer if the path's > pr

[PATCH 2/2] multipath-tools tests: add void parameter to functions

2024-01-30 Thread Benjamin Marzinski
This allows the tests to be compiled with -Werror=strict-prototypes Reported-by: Tomasz Kłoczko (github.com/opensvc/multipath-tools/issues/80) Signed-off-by: Benjamin Marzinski --- tests/alias.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/alias.c b/tests

[PATCH 0/2] Minor multipath fixes

2024-01-30 Thread Benjamin Marzinski
two small fixes. Benjamin Marzinski (2): libmultipath: fix displaying auto_resize config setting multipath-tools tests: add void parameter to functions libmultipath/dict.c | 2 -- tests/alias.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) -- 2.43.0

[PATCH 1/2] libmultipath: fix displaying auto_resize config setting

2024-01-30 Thread Benjamin Marzinski
When 56476ebd3 ("multipathd: fix auto-resize configuration") removed AUTO_RESIZE_UNDEFINED, it didn't update print_auto_resize() to print a value for when it was set to 0 (which is now AUTO_RESIZE_NEVER). Fixes: 56476ebd3 ("multipathd: fix auto-resize configuration"

Re: [PATCH] multipathd: the sysfs prioritizer can return stale data

2024-01-31 Thread Benjamin Marzinski
On Wed, Jan 31, 2024 at 09:12:23PM +0100, Martin Wilck wrote: > Hi Brian, > > This is what we are doing now in our recommended configuration. I > > will > > probably add a patch for our hw table entry soon. It is a bit strange > > to > > me still that detect_prio would mean replace the one that I a

Re: [PATCH v5 00/14] dm-raid/md/raid: fix v6.7 regressions

2024-02-02 Thread Benjamin Marzinski
On Thu, Feb 01, 2024 at 05:25:45PM +0800, Yu Kuai wrote: > From: Yu Kuai > I apply this patchset on top of v6.8-rc1, and run lvm2 tests suite with > folling cmd for 24 round(for about 2 days): > > for t in `ls test/shell`; do > if cat test/shell/$t | grep raid &> /dev/null; then >

  1   2   3   4   5   6   7   8   >