Re: [dm-devel] [PATCH] scsi_dh: add new rdac devices

2017-12-07 Thread Martin K. Petersen
Xose, > Add IBM 3542 and 3552, arrays: FAStT200 and FAStT500. > Add full STK OPENstorage family, arrays: 9176, D173, D178, D210, D220, D240 > and D280. > Add STK BladeCtlr family, arrays: B210, B220, B240 and B280. > > These changes were done in multipath-tools time ago. Applied to

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:49 -0600, Benjamin Marzinski wrote: > There are a couple of issues I noticed with the marginal paths code. > > In hit_io_err_recheck_time() there are some problems with the initial > checks. We should always recover the path if there are no other > usable > paths to the

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:49 -0600, Benjamin Marzinski wrote: > If a path's checker state is down before and after a path check, but > the > path's dmstate is active, mutipath won't update the dmstate. It only > updates the dmstate when the path first fails. This can cause the > kernel to try

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:49 -0600, Benjamin Marzinski wrote: > set_no_path_retry() was always updating the queue_if_no_path setting, > even if it was unnecessary. This caused problems when no_path_retry > was > set to a number, where any time __setup_multipath() was called with > reset, queuing

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:49 -0600, Benjamin Marzinski wrote: > Instead of having multiple functions all running slightly different > code to move a multipath device to recovery mode, there is now > an enter_recovery_mode() function that all of them call. > > Signed-off-by: Benjamin Marzinski

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote: > Right now multipath does some extra work to set the values for > no_path_retry and retain_hwhandler on existing maps it reads in from > the > kernel. This is so that select_action() can use these values to see > if > it needs to

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: Martin Wilck

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote: > This commit simply moves sync_map_state() and update_map() from > multipathd/main.c to libmultipath/structs_vec.c, to enable future > changes. > > Signed-off-by: Benjamin Marzinski > --- > Reviewed-by: Martin

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote: > If the existing multipath table does not have a hardware handler set, > then even if retain_hwhandler is enabled on the new table, it may > still > be possible to set the hardware handler on reload. So, adding a > hardware handler to

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote: > If the lower-priority passive paths for a multipath device appear > first, > IO can go to them and cause the hardware handler to activate them, > before the higher priority paths appear, causing the devices to > failback. Setting the

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

2017-12-07 Thread Benjamin Marzinski
There are a couple of issues I noticed with the marginal paths code. In hit_io_err_recheck_time() there are some problems with the initial checks. We should always recover the path if there are no other usable paths to the device, so this check should be first. Also, we just checked that

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

2017-12-07 Thread Benjamin Marzinski
select_rr_weight() and select_pgfailback() don't need to be set each time setup_multipath is called, since nothing ever changes the value of the multipath variable that they set. select_flush_on_last_del() and select_no_path retry() are a little more involved. In multipathd, it is possible to

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

2017-12-07 Thread Benjamin Marzinski
If a path's checker state is down before and after a path check, but the path's dmstate is active, mutipath won't update the dmstate. It only updates the dmstate when the path first fails. This can cause the kernel to try known faulty paths, if the multipath device was reloaded outside of

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

2017-12-07 Thread Benjamin Marzinski
This commit simply moves sync_map_state() and update_map() from multipathd/main.c to libmultipath/structs_vec.c, to enable future changes. Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 74 ++

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

2017-12-07 Thread Benjamin Marzinski
Right now, devices created by multipath and added to multipthd via ev_add_map() are setup up incorrectly until the first time they get reloaded. setup_map() is not run on these devices, which means that all of the multipath variables set up there don't get initialized until a later reload. Also,

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

2017-12-07 Thread Benjamin Marzinski
Instead of having multiple functions all running slightly different code to move a multipath device to recovery mode, there is now an enter_recovery_mode() function that all of them call. Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 52

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

2017-12-07 Thread Benjamin Marzinski
set_no_path_retry() was always updating the queue_if_no_path setting, even if it was unnecessary. This caused problems when no_path_retry was set to a number, where any time __setup_multipath() was called with reset, queuing automatically restarted, even if there were no usable paths. Instead,

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

2017-12-07 Thread Benjamin Marzinski
If the lower-priority passive paths for a multipath device appear first, IO can go to them and cause the hardware handler to activate them, before the higher priority paths appear, causing the devices to failback. Setting the "ghost_delay" parameter to a value greater than 0 can avoid this

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

2017-12-07 Thread Benjamin Marzinski
setup multipath is only called by the daemon, so there is no point in the is_daemon parameter. Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 6 +++--- libmultipath/structs_vec.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

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

2017-12-07 Thread Benjamin Marzinski
Right now multipath does some extra work to set the values for no_path_retry and retain_hwhandler on existing maps it reads in from the kernel. This is so that select_action() can use these values to see if it needs to reload the devices. However, the way it works, the queue_if_no_path feature

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

2017-12-07 Thread Benjamin Marzinski
If the existing multipath table does not have a hardware handler set, then even if retain_hwhandler is enabled on the new table, it may still be possible to set the hardware handler on reload. So, adding a hardware handler to the table should trigger a reload in this case. Signed-off-by: Benjamin

[dm-devel] [PATCH 00/12] Misc fixes

2017-12-07 Thread Benjamin Marzinski
The first patch here is just a rebased version of an earlier patch. The last patch is fixes for commit 95d594fd6f031e59bb73d04a631b6c592fe26214 "multipath-tools: intermittent IO error accounting to improve reliability". The rest of the patches are various fixes and code cleanups that I've been

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

2017-12-07 Thread Benjamin Marzinski
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: Martin Wilck Signed-off-by: Benjamin Marzinski ---

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

2017-12-07 Thread Martin Wilck
On Thu, 2017-12-07 at 12:26 +0800, Guan Junxiong wrote: > Hi Martin, > > I have tested this patch and found something needed to be correct. My > comments inline. > > > > @@ -340,8 +323,14 @@ int getprio(struct path *pp, char *args, > > unsigned int timeout) > > ".It is

[dm-devel] [PATCH] dm bufio: fix shrinker scans when (nr_to_scan < retain_target)

2017-12-07 Thread Suren Baghdasaryan
When system is under memory pressure it is observed that dm bufio shrinker often reclaims only one buffer per scan. This change fixes the following two issues in dm bufio shrinker that cause this behavior: 1. ((nr_to_scan - freed) <= retain_target) condition is used to terminate slab scan