[dm-devel] [PATCH 05/10] kpartx: dm_devn: return error for non-existent device

2017-05-05 Thread Martin Wilck
For non-existent maps (ENXIO from ioctl()), dm_task_run and dm_task_get_info return success. We need to check info.exists. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/devmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpartx/devmapper.c b/

[dm-devel] [PATCH 03/10] kpartx: remove is_loop_device

2017-05-05 Thread Martin Wilck
This function is not used any more. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/lopart.c | 31 --- kpartx/lopart.h | 1 - 2 files changed, 32 deletions(-) diff --git a/kpartx/lopart.c b/kpartx/lopart.c index 2eb3f631..44f0c277 100644 --- a/

[dm-devel] [PATCH] libmultipath: lazy device-mapper initialization

2017-06-06 Thread Martin Wilck
arted only after udev settle and thus the modules are loaded too late for udev rule processing, causing "multipath" invocations from udev rules to fail and paths to be wrongly classified as non-multipath. Fixes: d7188fcd "multipathd: start daemon after udev trigger" Si

Re: [dm-devel] [PATCH 0/5] misc multipath patches

2017-06-06 Thread Martin Wilck
ince > librados isn't supported on all architectures yet). If people have > objections, I can continue to use the existing build option. Well, we're getting close to having to write configure.ac, or something of the kind :-) But it's fine with me. ACK from me for this series. Martin --

Re: [dm-devel] [PATCH 15/31] multipath: implement "check usable paths" (-C/-U)

2017-09-14 Thread Martin Wilck
On Wed, 2017-09-13 at 15:53 -0500, Benjamin Marzinski wrote: > On Sun, Sep 03, 2017 at 12:38:44AM +0200, Martin Wilck wrote: > > When we process udev rules, it's crucial to know whether I/O on a > > given > > device will succeed. Unfortunately DM_NR_VALID_PATHS is not >

Re: [dm-devel] [PATCH 09/31] libmultipath: support MPATH_UDEV_NO_PATHS_FLAG on map creation

2017-09-14 Thread Martin Wilck
On Wed, 2017-09-13 at 15:33 -0500, Benjamin Marzinski wrote: > On Sun, Sep 03, 2017 at 12:38:38AM +0200, Martin Wilck wrote: > > Some vendor kernels (e.g. SUSE) have supported loading multipath > > maps without valid paths for a long time. Without that feature, > > problems

Re: [dm-devel] [PATCH 21/31] 11-dm-mpath.rules: Remember DM_ACTIVATION

2017-09-14 Thread Martin Wilck
Hi Ben, On Wed, 2017-09-13 at 16:19 -0500, Benjamin Marzinski wrote: > On Sun, Sep 03, 2017 at 12:38:50AM +0200, Martin Wilck wrote: > > If DM_ACTIVATION is set by the general dm rules, we need to > > bring up this device. But if the mpath device is not ready, > > th

Re: [dm-devel] [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability

2017-09-18 Thread Martin Wilck
have a test procedure to derive the optimal settings experimentally, thus guesswork is going to be applied, with questionable odds for success. IOW: the whole stuff is basically useless without good default values. It would be up to you hardware guys to come up with them. > san_path_err_for

Re: [dm-devel] [PATCH 21/31] 11-dm-mpath.rules: Remember DM_ACTIVATION

2017-09-18 Thread Martin Wilck
On Fri, 2017-09-15 at 15:40 -0500, Benjamin Marzinski wrote: > On Thu, Sep 14, 2017 at 03:06:43PM +0200, Martin Wilck wrote: > > Hi Ben, > > > > On Wed, 2017-09-13 at 16:19 -0500, Benjamin Marzinski wrote: > > > On Sun, Sep 03, 2017 at 12:38:

Re: [dm-devel] [PATCH v2 0/5] multipath: alternative reservation_key method

2017-09-18 Thread Martin Wilck
hen > devices are > configured to use the prkeys file, and will set and clear the > reservation > keys automatically. > > Changes in v2: > - use struct be64 instead of uint64_t to hold the reservation_key >(Martin Wilck) > > Benjamin Marzinski (5): > libmu

Re: [dm-devel] [PATCH] libmultipath: sanitize fd handling

2017-09-20 Thread Martin Wilck
On Wed, 2017-09-20 at 13:32 +0200, Martin Wilck wrote: > On Fri, 2017-09-15 at 08:15 +0200, Hannes Reinecke wrote: > > > > Signed-off-by: Hannes Reinecke <h...@suse.com> > > --- > > libmultipath/checkers.c | 4 ++-- > > libmultipath/print.c| 2 +- &

Re: [dm-devel] [PATCH 20/31] 11-dm-mpath.rules: don't set READY->ACTIVATION

2017-09-13 Thread Martin Wilck
On Wed, 2017-09-13 at 16:19 -0500, Benjamin Marzinski wrote: > On Sun, Sep 03, 2017 at 12:38:49AM +0200, Martin Wilck wrote: > > The fact alone that a map changes from not ready to ready does > > not imply that it is activating. > > NAK on this one and > [PATCH 21/31] 11-

Re: [dm-devel] [PATCH 20/31] 11-dm-mpath.rules: don't set READY->ACTIVATION

2017-09-14 Thread Martin Wilck
On Wed, 2017-09-13 at 16:19 -0500, Benjamin Marzinski wrote: > On Sun, Sep 03, 2017 at 12:38:49AM +0200, Martin Wilck wrote: > > The fact alone that a map changes from not ready to ready does > > not imply that it is activating. > > NAK on this one and > [PATCH 21/31] 11-

[dm-devel] [PATCH v2 31/31] kpartx.rules: move symlink code to other files

2017-09-14 Thread Martin Wilck
, so we can rely on the latter to create the symlinks. The reason I put this last in the series is that it will possibly require changes in other packages, notably dracut, in order to make sure partitions mappings are cleanly set up during boot. Signed-off-by: Martin Wilck <mwi...@suse.

[dm-devel] [PATCH v2 30/31] kpartx/del-part-nodes.rules: new udev file

2017-09-14 Thread Martin Wilck
this behavior are provided via kernel parameter "dont_del_part_nodes", or a custom udev rules file setting the "DONT_DEL_PART_NODES" environment variable. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/Makefile | 2 ++ kpartx/del-part-nodes.rules |

[dm-devel] [PATCH v2 4/4] multipath: delegate dangerous commands to multipathd

2017-09-14 Thread Martin Wilck
exec'ing multipathd (Ben Marzinski) - pass more parameters from main program, preparing for other commands Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 62 1 file changed, 62 insertions(+) diff --git a

Re: [dm-devel] [PATCH] libmultipath: sanitize fd handling

2017-09-20 Thread Martin Wilck
gt; %s\n", > > monitored_count, is_uevent_busy()? "True" > : > > "False"); > > Signed-off-by: Hannes Reinecke <h...@suse.com> > --- > libmultipath/checkers.c | 4 ++-- > libmultipath/print.c| 2 +- > 2 files

Re: [dm-devel] libmultipath: add pthread_cleanup hook for udev monitor

2017-09-20 Thread Martin Wilck
On Fri, 2017-09-15 at 08:14 +0200, Hannes Reinecke wrote: > The udev monitor from uevent_listen() needs to be cleaned up from > a pthread cleanup hook. > Valgrind complained here. > > Signed-off-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Martin Wilck <mwi...@suse.co

Re: [dm-devel] [PATCH 4/4] multipath: delegate dangerous commands to multipathd

2017-09-08 Thread Martin Wilck
On Thu, 2017-09-07 at 16:57 -0500, Benjamin Marzinski wrote: > On Tue, Aug 29, 2017 at 12:05:36AM +0200, Martin Wilck wrote: > > Some multipath commands are dangerous to run while multipathd is > > running. > > For example, "multipath -r" may apply a modified

Re: [dm-devel] [PATCH 1/5] libmultipath: pull functions into util.c

2017-09-08 Thread Martin Wilck
changed, 43 insertions(+), 36 deletions(-) > Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 2/5] libmultipath: change reservation_key to a uint64_t

2017-09-08 Thread Martin Wilck
_reskey_from_uint64(r, x) do { (r)->_v = (x); } while (0) Using be64_to_cpu is all too easily forgotten, which leads to nasty bugs. Apart from that, ack. -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [dm-devel] [PATCH 3/5] libmpathpersist: fix update_prflag code

2017-09-08 Thread Martin Wilck
amin Marzinski <bmarz...@redhat.com> > --- > libmpathpersist/mpath_persist.c | 9 - > libmpathpersist/mpath_updatepr.c | 33 +- > --- > libmpathpersist/mpathpr.h | 2 +- > 3 files changed, 22 insertions(+), 22 deletions(-) > Reviewed-by

Re: [dm-devel] [PATCH 5/5] mpathpersist: add support for prkeys file

2017-09-08 Thread Martin Wilck
libmpathpersist/mpathpr.h| 1 + > 3 files changed, 37 insertions(+), 16 deletions(-) > Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton

Re: [dm-devel] [PATCH 4/5] multipath: add alternate reservation_key method

2017-09-08 Thread Martin Wilck
cli_handlers.c | 82 +++ > multipathd/cli_handlers.h | 3 + > multipathd/main.c | 3 + > 15 files changed, 388 insertions(+), 20 deletions(-) > create mode 100644 libmultipath/prkey.c > create mode 100644 libmultipath/prkey.h Looks ok to me. I suppo

Re: [dm-devel] [PATCH] multipath-tools: fix incorrect length for strncmp in uevent.c

2017-09-05 Thread Martin Wilck
On Tue, 2017-09-05 at 11:54 +0800, Guan Junxiong wrote: > Cc: Martin Wilck <mwi...@suse.com> > Signed-off-by: Junxiong Guan <guanjunxi...@huawei.com> > --- > libmultipath/uevent.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lib

Re: [dm-devel] [PATCH v3] multipath-tools: intermittent IO error accounting to improve reliability

2017-09-05 Thread Martin Wilck
On Tue, 2017-09-05 at 10:59 +0800, Guan Junxiong wrote: > Hi Martin, > Thanks for you remarks and compiling check. > An new patch will be updated in this week. > Other response is inline. > > Cheers > Guan Junxiong > > On 2017/9/5 4:59, Martin Wilck wrote: > &g

Re: [dm-devel] [PATCH 0/5] new devices + one fix

2017-09-29 Thread Martin Wilck
hardware table > > libdmmp/Makefile | 1 + > libmultipath/hwtable.c | 27 ++- > 2 files changed, 23 insertions(+), 5 deletions(-) I'd appreciate some information or references where you gathered the information about and tuning recommendations for the new de

Re: [dm-devel] multipath-tools 0.7.3

2017-09-25 Thread Martin Wilck
changes https://www.redhat.com/archives/dm-devel/2017-September/msg00275.html Martin Wilck multipath: delegate dangerous commands to multipathd (v2) https://www.redhat.com/archives/dm-devel/2017-September/msg00182.html Also, please consider merging the following bug fix

Re: [dm-devel] [PATCH] multipath-tools: replace "setting: array" with "setting: storage device" at multipath output

2017-08-28 Thread Martin Wilck
On Sun, 2017-08-20 at 02:47 +0200, Xose Vazquez Perez wrote: > Reported-by: Martin Wilck <mwi...@suse.com> > Cc: Christophe Varoqui <christophe.varo...@opensvc.com> > Cc: device-mapper development <dm-devel@redhat.com> > Signed-off-by: Xose Vazquez Perez <x

Re: [dm-devel] [PATCH] multipath-tools: intermittent IO error accounting to improve reliability

2017-08-28 Thread Martin Wilck
ormal, which means , when path checker > detects it > is up, it will reinstate into the usable path. > > However, how about we schedule the intermittent IO checking process > again when > the path_io_err_recovery_time seconds expires. If the number of IO > erros is less > than path_io_err_num_t

Re: [dm-devel] [PATCH] multipath-tools: intermittent IO error accounting to improve reliability

2017-08-28 Thread Martin Wilck
are > diff --git a/multipathd/main.c b/multipathd/main.c > index 4be2c579..d12e6fae 100644 > --- a/multipathd/main.c > +++ b/multipathd/main.c > @@ -84,6 +84,7 @@ int uxsock_timeout; > #include "cli_handlers.h" > #include "lock.h" > #include "wai

[dm-devel] [PATCH 4/4] multipath: delegate dangerous commands to multipathd

2017-08-28 Thread Martin Wilck
fer to use equivalent multipathd client commands instead. For now, do this only for "multipath -r", but other invocations may be added in the future. Perhaps some day, all "multipath" commands will be mapped to multipathd actions. Signed-off-by: Martin Wilck <mwi...@sus

[dm-devel] [PATCH 2/4] libmultipath: add_feature: skip pointless NULL check

2017-08-28 Thread Martin Wilck
The case f == NULL is already handled by the code from b1ecdd46b6ec "segment faulty occured in add_feature()" above. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/structs.c | 27 --- 1 file changed, 12 insertions(+), 15 deletion

[dm-devel] [PATCH 3/4] libmultipath: add_feature: allow only 1 feature

2017-08-28 Thread Martin Wilck
y one strncpy() call to make the code easier to review. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/structs.c | 64 +- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/libmultipath/structs.c b/libmultipat

[dm-devel] [PATCH 1/4] multipathd: don't flood system with sd_notify calls

2017-08-28 Thread Martin Wilck
of traffic on dbus as systemd forwards these messages on the system bus. This can be seen with systemd.log_level=debug. Better skip these notifications that don't provide useful information to the user, who is very unlikely to catch the daemon in "running" state anyway. Signed-off-by: Martin

Re: [dm-devel] [PATCH 2/4] libmultipath: add_feature: skip pointless NULL check

2017-08-29 Thread Martin Wilck
On Tue, 2017-08-29 at 08:37 +0200, Hannes Reinecke wrote: > On 08/29/2017 12:05 AM, Martin Wilck wrote: > > The case f == NULL is already handled by the code from > > b1ecdd46b6ec "segment faulty occured in add_feature()" above. > > > > > At one poi

[dm-devel] [PATCH 23/31] kpartx.rules: don't rely on DM_DEPS and DM_TABLE_STATE

2017-09-02 Thread Martin Wilck
-by: Martin Wilck <mwi...@suse.com> --- kpartx/kpartx.rules | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules index 64d550de..ea34e449 100644 --- a/kpartx/kpartx.rules +++ b/kpartx/kpartx.rules @@ -5,12 +5,12 @@ #

[dm-devel] [PATCH 29/31] multipath/kpartx rules: avoid superfluous scanning

2017-09-02 Thread Martin Wilck
events are another. The LVM rules rely on DM_ACTIVATION, but other rules such as kpartx can't do that, because they'd miss e.g. partition table changes. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/kpartx.rules | 3 +++ multipath/11-dm-mpath.rules | 8 +++- 2 files c

[dm-devel] [PATCH 14/31] libmultipath: add dm_get_multipath

2017-09-02 Thread Martin Wilck
This function is simply factored out from dm_get_maps. No functional difference. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/devmapper.c | 43 +++ libmultipath/devmapper.h | 1 + 2 files changed, 28 insertions(+), 16 deletions(-)

[dm-devel] [PATCH 18/31] 11-dm-mpath.rules: no need to test before IMPORT

2017-09-02 Thread Martin Wilck
This code is run before 13-dm-disk.rules which calls "blkid", therefore the code can be simplified because the condition checked always holds. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/11-dm-mpath.rules | 14 +++--- 1 file changed, 7 insertions(+), 7 de

[dm-devel] [PATCH 17/31] 11-dm-mpath.rules: import more ID_FS_xxx vars from db

2017-09-02 Thread Martin Wilck
We have code for importing blkid variables from db but this code is missing the _ENC variants needed for creating symlinks, and ID_FS_LABEL. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/11-dm-mpath.rules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

Re: [dm-devel] [PATCH v3] multipath-tools: intermittent IO error accounting to improve reliability

2017-09-04 Thread Martin Wilck
for a > +path will last for \fIpath_io_err_sample_time\fR. If the rate of IO > error on > +a particular path is greater than the > \fIpath_io_err_rate_threshold\fR, then > +the path will not reinstate for \fIpath_io_err_rate_threshold\fR > seconds unless > +there is only one activ

Re: [dm-devel] [PATCH] multipath-tools: intermittent IO error accounting to improve reliability

2017-09-04 Thread Martin Wilck
> > path_io_err_num_threshold, then the path will not reinstate for > > > > It would be more user-friendly to allow the user to specify the > > error > > rate threshold as a percentage > > Error rate threshold as a percentage is not enough to distinguish > sma

Re: [dm-devel] [PATCH] multipath-tools: support for coalescing heterogenous paths

2017-09-04 Thread Martin Wilck
Junxiong Guan <guanjunxi...@huawei.com> > > > --- > > > libmultipath/Makefile | 3 +- > > > libmultipath/config.h | 1 + > > > libmultipath/udevrule.c | 191 > > > > > > libmultipath/udevr

[dm-devel] [PATCH 07/31] test-kpartx: test deletion with empty part table

2017-09-02 Thread Martin Wilck
Added a test case for "kpartx: fix part deletion without partition table". Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/test-kpartx | 14 ++ 1 file changed, 14 insertions(+) diff --git a/kpartx/test-kpartx b/kpartx/test-kpartx index 35b0f064..60b3eb23 100

[dm-devel] [PATCH 26/31] kpartx.rules: create by-partuuid and by-partlabel symlinks

2017-09-02 Thread Martin Wilck
The LVM rules do this since 2.02.173 (c48149cf80 "udev: also create /dev/disk/by-part{label,uuid} and gpt-auto-root symlinks"). We have to do it here for partitions on unaccessible mpath maps. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/kpartx.rules | 6 ++ 1

[dm-devel] [PATCH 31/31] kpartx.rules: move symlink code to other files

2017-09-02 Thread Martin Wilck
, so we can rely on the latter to create the symlinks. The reason I put this last in the series is that it will possibly require changes in other packages, notably dracut, in order to make sure partitions mappings are cleanly set up during boot. Signed-off-by: Martin Wilck <mwi...@suse.

[dm-devel] [PATCH 24/31] kpartx.rules: respect DM_UDEV_LOW_PRIORITY_FLAG

2017-09-02 Thread Martin Wilck
kpartx.rules increased link priority unconditionally, but for explicitly marked low prio devices that shouldn't be done. Fix that. Also, use "+=" for OPTIONS, as most other rules do. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/kpartx.rules | 2 +- 1 file changed, 1

[dm-devel] [PATCH 12/31] libmultipath: use const char* in some dm helpers

2017-09-02 Thread Martin Wilck
Changing dm_get_info and dm_get_uuid for now. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/devmapper.c | 4 ++-- libmultipath/devmapper.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index 7a

[dm-devel] [PATCH 11/31] libmultipath: get_refwwid: use get_udev_device

2017-09-02 Thread Martin Wilck
Call the factored-out function to obtain the udev device. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 73

[dm-devel] [PATCH 01/31] libmultipath: fix partition_delimiter config option

2017-09-02 Thread Martin Wilck
The partition_delimiter setting was effecitvely ignored. Fix it. Fixes: 95bf339bb9d7 "correctly set partition delimiter on rename" Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/devmapper.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletion

[dm-devel] [PATCH 21/31] 11-dm-mpath.rules: Remember DM_ACTIVATION

2017-09-02 Thread Martin Wilck
If DM_ACTIVATION is set by the general dm rules, we need to bring up this device. But if the mpath device is not ready, that would be dangerous; it could hang or produce lots of IO errors. So remember this state, and try to activate when the map becomes usable later. Signed-off-by: Martin Wilck

[dm-devel] [PATCH 06/31] kpartx: fix part deletion without partition table

2017-09-02 Thread Martin Wilck
If we are deleting partition mappings, there's no need to parse the partition table. We just look for mappings created by kpartx and destroy them. Without this patch, kpartx fails to delete partition mappings on devices on which the partition table has been destroyed. Signed-off-by: Martin Wilck

[dm-devel] [PATCH 13/31] libmultipath: add DI_NOIO flag for pathinfo

2017-09-02 Thread Martin Wilck
This flag can used to avoid any IO on the device itself. Useful for getting the path state without the risk of hanging or running into IO errors. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/discovery.c | 8 libmultipath/discovery.h | 2 ++ 2 files chang

[dm-devel] [PATCH 25/31] kpartx.rules: improved logic for by-uuid and by-label links

2017-09-02 Thread Martin Wilck
to do IO). Moreover, the previous logic for running IMPORT{db} was wrong (condition used '=="?*"' rather than '!="?*"'). Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/kpartx.rules | 24 ++-- 1 file changed, 18 insertions(+), 6 deletio

[dm-devel] [PATCH 30/31] kpartx/del-part-nodes.rules: new udev file

2017-09-02 Thread Martin Wilck
this behavior are provided via kernel parameter "dont_del_part_nodes", or a custom udev rules file setting the "DONT_DEL_PART_NODES" environment variable. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/Makefile | 1 + kpartx/del-part-nodes.rules |

[dm-devel] [PATCH 02/31] kpartx: helper functions for name and uuid generation

2017-09-02 Thread Martin Wilck
strip_slash() is copied from kpartx.c, and will be removed there in a follow-up patch. The others are new helpers. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/devmapper.c | 44 ++-- 1 file changed, 38 insertions(+), 6 deletions(-) diff

[dm-devel] [PATCH 08/31] kpartx: only recognize dasd part table on DASD

2017-09-02 Thread Martin Wilck
pretending an existing partition table although there was none. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/dasd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kpartx/dasd.c b/kpartx/dasd.c index f50c1bdb..e418d5ac 100644 --- a/kpartx/dasd.c +++ b/kpartx/dasd.c

[dm-devel] [PATCH 20/31] 11-dm-mpath.rules: don't set READY->ACTIVATION

2017-09-02 Thread Martin Wilck
The fact alone that a map changes from not ready to ready does not imply that it is activating. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/11-dm-mpath.rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multipath/11-dm-mpath.rules b/multipath

[dm-devel] [PATCH 03/31] kpartx: search partitions by UUID, and rename

2017-09-02 Thread Martin Wilck
seems to be more universal. So, when the search for the named partition fails, search for the UUID instead and try to rename the map. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/devmapper.c | 108 - kpartx/devmapper.h

[dm-devel] [PATCH 04/31] test-kpartx: add tests for renaming functionality

2017-09-02 Thread Martin Wilck
Add test for the functionality implemented in patch "kpartx: search partitions by UUID, and rename". Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/test-kpartx | 36 1 file changed, 36 insertions(+) diff --git a/kpartx/test-kpar

[dm-devel] [PATCH 19/31] 11-dm-mpath.rules: handle new maps with READY==0

2017-09-02 Thread Martin Wilck
We need to distinguish the case where a device came up with ENV{MPATH_DEVICE_READY}=="0" in the first place from the case where it changed from "ready" to "not ready". Otherwise, we may save a wrong state in DM_DISABLE_OTHER_RULES_FLAG_OLD. Signed-off-by:

[dm-devel] [PATCH 28/31] kpartx.rules: fix logic for adding partitions

2017-09-02 Thread Martin Wilck
if DM_ACTIVATION=1; doing so we would miss events caused e.g. by partition table editing. It's not necessary to scan for certain events. This will be handled in another patch. Currently this works for multipath only, but code for other targets could be added if desired. Signed-off-by: Martin Wilck <

[dm-devel] [PATCH 00/31] multipath/kpartx udev rules cleanup, and fixes

2017-09-02 Thread Martin Wilck
, systemd, and kpartx quite a bit with failover and 0-paths scenarios, successfully. The changes are less drastic than the stats below suggest. A considerable part just moves functionality out of existing code into separate functions in order to use it elsewhere. Regards, Martin Martin Wilck (31): libm

[dm-devel] [PATCH 22/31] multipath.rules: set ID_FS_TYPE to "mpath_member"

2017-09-02 Thread Martin Wilck
... for devices that have been identified as such. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/multipath.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipath/multipath.rules b/multipath/multipath.rules index 86defc0c..bc1a8529 100644 --- a/mul

[dm-devel] [PATCH 27/31] kpartx.rules: generate type-name links only for multipath devices

2017-09-02 Thread Martin Wilck
... and their partitions. This rule generates irritiating symlinks like /dev/disk/by-id/raid-${VG}-${LV} for LVM LVs otherwise. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/kpartx.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpartx/kpartx.rules b/

[dm-devel] [PATCH 15/31] multipath: implement "check usable paths" (-C/-U)

2017-09-02 Thread Martin Wilck
if a given map has usable paths. Obviously this command must avoid doing any I/O on the multipath map itself, thus no checkers are called; only status from sysfs and dm is collected. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/config.h | 1 + multipath/

[dm-devel] [PATCH 16/31] 11-dm-mpath.rules: multipath -U for READY check

2017-09-02 Thread Martin Wilck
For kernel-generated path events, DM_NR_VALID_PATHS indicates whether usable paths are available. But this information isn't reliable as events may be received out of order. Use multipath -U to determine whether a multipath map can handle I/O. Signed-off-by: Martin Wilck <mwi...@suse.

[dm-devel] [PATCH 10/31] libmultipath: add get_udev_device

2017-09-02 Thread Martin Wilck
This factors out the functionality of retrieving the udev_device from different device types from get_refwwid. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 35 +++ libmultipath/configure.h | 1 + 2 files changed, 36 inse

[dm-devel] [PATCH 05/31] kpartx: fix a corner case when renaming partitions

2017-09-02 Thread Martin Wilck
ee whether or not the device is a dm device. Signed-off-by: Martin Wilck <mwi...@suse.com> --- kpartx/devmapper.c | 44 +++- kpartx/devmapper.h | 13 + kpartx/kpartx.c| 25 - 3 files changed, 56 insertions(+), 26 de

Re: [dm-devel] [PATCH v4 1/6] libmultipath: add detect_checker option

2017-10-09 Thread Martin Wilck
On Mon, 2017-10-09 at 14:09 -0500, Benjamin Marzinski wrote: > On Thu, Oct 05, 2017 at 10:25:50PM +0200, Martin Wilck wrote: > > > > Like this, perhaps? > > > > Martin Wilck (1): > > limbultipath: prefer RDAC checker with detect_checker > > Oops. I tota

[dm-devel] [PATCH 1/1] limbultipath: prefer RDAC checker with detect_checker

2017-10-05 Thread Martin Wilck
With "detect_checker yes", ALUA is used for all storage devices that support ALUA. But currently RDAC is still preferred for RDAC devices (https://www.redhat.com/archives/dm-devel/2017-September/msg00326.html) Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipat

Re: [dm-devel] [PATCH v4 1/6] libmultipath: add detect_checker option

2017-10-05 Thread Martin Wilck
). It is set > > > on by > > > default just like detect_prio and retain_attached_hw_handler. > > > > RDAC devices are going also to be affected with this change. > > Is it desired? > > No. I'll send a patch that adds a check_rdac() call before setting >

Re: [dm-devel] [PATCH 1/1] multipath-tools: Skip CHANGE uevent for non-mpath devices

2017-10-06 Thread Martin Wilck
Srivastava <ritika.srivast...@oracle.com> OK, but IMO it could be done more nicely. I'll post an alternative patch soon. Regards, Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (

Re: [dm-devel] [PATCH 3/4] libmultipath: path latency: simplify getprio()

2017-11-23 Thread Martin Wilck
than I do. Just in case I made a silly mistake. Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mail

Re: [dm-devel] [PATCH] multipath-tools: Makefile: Respect standard toolchain related envvars

2017-12-18 Thread Martin Wilck
n. At openSUSE, we simply set OPTFLAGS=%{optflags} in the spec file. RPM_OPT_FLAGS aka %{optflags} is a standard for RPM-based distros, but "OPTFLAGS" is not. Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 2/2] libmultipath: don't update path queueing on reload

2017-12-18 Thread Martin Wilck
On Wed, 2017-12-13 at 12:08 -0600, Benjamin Marzinski wrote: > With the fix to the features handling code, the multipath device > should > already be reloaded with the correct value for queue_if_no_path, so > there's no need to go reset it immediately afterwards. > > Cc:

Re: [dm-devel] [PATCH 0/4] path latency prio fixes

2017-11-20 Thread Martin Wilck
with group_by_prio. Putting Hannes and Ben on CC because I'd like to get their opinion, too. Regards Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm

Re: [dm-devel] [PATCH 3/4] libmultipath: path latency: simplify getprio()

2017-11-20 Thread Martin Wilck
Hello Guan, > On 2017/11/18 8:11, Martin Wilck wrote: > > The log standard deviation can be calculated much more simply > > by realizing > > > >sum_n (x_i - avg(x))^2 == sum_n x_i^2 - n * avg(x)^2 > > > > I derive the equation: > sum_n {(x_i - av

[dm-devel] [PATCH] libmultipath: fix return code of sysfs_get_timeout

2017-11-20 Thread Martin Wilck
This function should return 1 on success, as the other sysfs_get_XXX functions. The callers actually expect this - therefore timeout values from sysfs are never used. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[dm-devel] [PATCH 1/4] libmultipath: path latency: fix default base num

2017-11-17 Thread Martin Wilck
I don't think anyone can measure latency to 1% accuracy. It's better to not even pretend to be able to. 10% should be fine even for the most latency-critical environments. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/prioritizers/path_latency.c | 5 +++-- 1 file chan

[dm-devel] [PATCH 4/4] libmultipath: path latency: remove warnings

2017-11-17 Thread Martin Wilck
ne a differentiation, in particular in combination with group_by_prio, because we'd loose the ability for load balancing. But this is rather a topic for the man page or a "best practices" document. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultip

[dm-devel] [PATCH 3/4] libmultipath: path latency: simplify getprio()

2017-11-17 Thread Martin Wilck
The log standard deviation can be calculated much more simply by realizing sum_n (x_i - avg(x))^2 == sum_n x_i^2 - n * avg(x)^2 Also, use timespecsub rather than the custom timeval_to_usec, and avoid taking log(0). Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/priori

[dm-devel] [PATCH 0/4] path latency prio fixes

2017-11-17 Thread Martin Wilck
ease check these fixes. I also have remaining issues with the "intermittent IO accounting" patch, will send these later. Martin Wilck (4): libmultipath: path latency: fix default base num libmultipath: path latency: log threshold with p2 libmultipath: path latency: simplify getprio()

[dm-devel] [PATCH 2/4] libmultipath: path latency: log threshold with p2

2017-11-17 Thread Martin Wilck
This is not a critical error. It just means that the path in question will have low priority (rightly so, if it has >100s latency). Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/prioritizers/path_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [dm-devel] [PATCH 01/12] multipath: add "ghost_delay" parameter

2017-12-07 Thread Martin Wilck
etting > the MPATH_UDEV_NO_PATHS_FLAG. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham N

Re: [dm-devel] [PATCH 09/12] multipathd: move recovery mode code to function

2017-12-07 Thread Martin Wilck
jamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-dev

Re: [dm-devel] [PATCH 10/12] multipathd: clean up set_no_path_retry

2017-12-07 Thread Martin Wilck
m_map_present() is pointless in __setup_multipath(), > since the existence of the map was just checked in dm_get_info(). > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, T

Re: [dm-devel] [PATCH 11/12] multipath: check failed path dmstate in check_path

2017-12-07 Thread Martin Wilck
ame thing > for > faulty paths. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Gra

Re: [dm-devel] [PATCH 03/12] multipath: fix hwhandler check in select_action

2017-12-07 Thread Martin Wilck
ardware handler to the table should trigger a reload in this case. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer,

Re: [dm-devel] [PATCH 04/12] libmultipath: cleanup features handling code

2017-12-07 Thread Martin Wilck
> so > the output when you created a map was incorrect. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> I had something similar in mind, but this is actually cleaner. Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel

Re: [dm-devel] [PATCH 02/12] kpartx: don't delete partitions from partitions

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote: > The current del-part-nodes rules try to run partx on the partitions > themselves, which will ofen fail with an error in the log, because > the > partitions will have been deleted before partx can run on them. > > Cc:

Re: [dm-devel] [PATCH 05/12] multipathd: move helper functions to libmultipath

2017-12-07 Thread Martin Wilck
> Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 12/12] multipathd: marginal path code fixes

2017-12-07 Thread Martin Wilck
ed memory, child() should wait > until these threads are stopped before calling > stop_io_err_stat_thread(). > > Cc: Guan Junxiong <guanjunxi...@huawei.com> > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin Wilck <mwi...@suse.com> --

Re: [dm-devel] [PATCH 04/12] libmultipath: cleanup features handling code

2017-12-08 Thread Martin Wilck
atures, > - "queue_if_no_pat > h"); > - } > - } AFAICS we could also get rid of the calls to dm_queue_if_no_path() in reload_map(), right? Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 06/12] multipathd: fix device creation issues

2017-12-08 Thread Martin Wilck
which will be removed before > the > end of configure(). Now, map_discovery() just gets the necessary > kernel > information to make the correct call in select_action(). > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <mwi...@suse.c

Re: [dm-devel] [PATCH 3/4] libmultipath: path latency: simplify getprio()

2017-12-07 Thread Martin Wilck
accuracy of the measurement (indicating that 68%, or error_function (sqrt(1/2)), of the measured values lie in the interval [avg/F, avg*F]). IOW, it tells you how stable your latencies for a certain path are. It has nothing to do with the artificial prio "bins" that the latency prioritizer

Re: [dm-devel] [PATCH 08/12] libmultipath: __setup_multipath param cleanup

2017-12-08 Thread Martin Wilck
On Thu, 2017-12-07 at 12:49 -0600, Benjamin Marzinski wrote: > setup multipath is only called by the daemon, so there is no point in > the is_daemon parameter. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin Wilck <mwi...@suse.com>

Re: [dm-devel] [PATCH 07/12] multipathd: remove select_* from setup_multipath

2017-12-08 Thread Martin Wilck
> > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] libmultipath: fix error parsing "find_multipaths strict"

2018-05-15 Thread Martin Wilck
THS_STRICT, having the highest numeric value, must be last in the enum. Fixes: c36f2f42 "libmultipath: change find_multipaths option to multi-value" Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

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