Re: [dm-devel] [PATCH v3 11/11] libmultipath: don't [un]set queue_if_no_path after domap

2017-06-22 Thread Martin Wilck
On Thu, 2017-06-22 at 14:21 -0500, Benjamin Marzinski wrote: > On Thu, Jun 22, 2017 at 08:23:44AM +0200, Hannes Reinecke wrote: > > On 06/21/2017 05:06 PM, Martin Wilck wrote: > > > We set the queue_if_no_path feature in assemble_map() already, > > > no need to set it here again. > > > > > > Signe

[dm-devel] [git pull] device mapper fixes for 4.12-rc7

2017-06-22 Thread Mike Snitzer
Hi Linus, The following changes since commit 32c1431eea4881a6b17bd7c639315010aeefa452: Linux 4.12-rc5 (2017-06-11 16:48:20 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-4.12/dm-fixes-4 for you to fetch chan

Re: [dm-devel] [PATCH v3 11/11] libmultipath: don't [un]set queue_if_no_path after domap

2017-06-22 Thread Benjamin Marzinski
On Thu, Jun 22, 2017 at 08:23:44AM +0200, Hannes Reinecke wrote: > On 06/21/2017 05:06 PM, Martin Wilck wrote: > > We set the queue_if_no_path feature in assemble_map() already, > > no need to set it here again. > > > > Signed-off-by: Martin Wilck > > --- > > libmultipath/configure.c | 15 --

Re: [dm-devel] [PATCH v4 10/11] libmultipath: don't try to set hwhandler if it is retained

2017-06-22 Thread Benjamin Marzinski
On Thu, Jun 22, 2017 at 04:59:12PM +0200, Martin Wilck wrote: > Setting a device handler only works if retain_attached_hw_handler > is 'no', or if the kernel didn't auto-assign a handler. If this > is not the case, don't even attempt to set a different handler. > > This requires reading the sysfs

Re: [dm-devel] [PATCH v4 09/11] libmultipath: retain_attached_hw_handler obsolete with 4.3+

2017-06-22 Thread Benjamin Marzinski
On Thu, Jun 22, 2017 at 04:59:11PM +0200, Martin Wilck wrote: > Kernels 4.3 and newer (commit 1bab0de0 "dm-mpath, scsi_dh: don't > let dm detach device handlers") imply "retain_attached_hw_handler yes". > > Clarify this in the propsel code, log messages, and documentation. ACK -Ben > > Signed-

[dm-devel] [PATCH] multipath-tools: beautify path_latency.c code

2017-06-22 Thread Xose Vazquez Perez
Mainly running scripts/Lindent, from kernel dir, to replace indent spaces by tabs. Cc: Yang Feng Cc: Christophe Varoqui Cc: device-mapper development Signed-off-by: Xose Vazquez Perez --- libmultipath/prioritizers/path_latency.c | 354 +++ 1 file changed, 177 inser

[dm-devel] [PATCH v4 11/11] libmultipath: don't [un]set queue_if_no_path after domap

2017-06-22 Thread Martin Wilck
We set the queue_if_no_path feature in assemble_map() already, no need to set it here again. Signed-off-by: Martin Wilck --- libmultipath/configure.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 03874f47..98589150 1

[dm-devel] [PATCH v4 04/11] libmultipath: merge_hwe: fix queue_if_no_path logic

2017-06-22 Thread Martin Wilck
The logic applied here should match the logic in select_features(). This is achieved by calling reconcile_features_with_options(). Signed-off-by: Martin Wilck Acked-by: Benjamin Marzinski --- libmultipath/config.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

[dm-devel] [PATCH v4 02/11] libmultipath: add/remove_feature: use const char* for feature

2017-06-22 Thread Martin Wilck
Change the argument type for the feature to add or remove to const char*, making it possible to pass const strings without warnings. Signed-off-by: Martin Wilck Acked-by: Benjamin Marzinski Reviewed-by: Hannes Reinecke --- libmultipath/structs.c | 30 -- libmultipat

[dm-devel] [PATCH v4 05/11] libmultipath: assemble_map: fix queue_if_no_path logic

2017-06-22 Thread Martin Wilck
It is wrong to remove the queue_if_no_path feature if no_path_retry is unset. Rather, in this case the feature should neither be added nor removed. Signed-off-by: Martin Wilck Acked-by: Benjamin Marzinski Reviewed-by: Hannes Reinecke --- libmultipath/dmparser.c | 5 ++--- 1 file changed, 2 ins

[dm-devel] [PATCH v4 06/11] multipath.conf.5: document no_path_retry vs. queue_if_no_path

2017-06-22 Thread Martin Wilck
Clarify the documentation about option precedence. Signed-off-by: Martin Wilck Acked-by: Benjamin Marzinski Reviewed-by: Hannes Reinecke --- multipath/multipath.conf.5 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5

[dm-devel] [PATCH v4 03/11] libmultipath: clarify option conflicts for "features"

2017-06-22 Thread Martin Wilck
The "features" option in multipath.conf can possibly conflict with "no_path_retry" and "retain_attached_hw_handler". Currently, "no_path_retry" takes precedence, unless it is set to "fail", in which case it's overridden by "queue_if_no_path". This is odd, either "features" or "no_path_retry" shoul

[dm-devel] [PATCH v4 01/11] libmultipath: load_config: skip setting unnecessary defaults

2017-06-22 Thread Martin Wilck
We have the logic for setting defaults for paths and maps in propsel.c. By pre-setting conf values with defaults in load_config(), we generate irritating log messages like 'features = "0" (setting: multipath.conf defaults/devices section)' if multipath.conf doesn't contain a features setting at all

[dm-devel] [PATCH v4 08/11] libmultipath: add deprecated warning for some features settings

2017-06-22 Thread Martin Wilck
The device-mapper features "queue_if_no_path" and "retain_attached_hw_handler" should be set via the configuration keywords "no_path_retry" and "retain_attached_hw_handler", respectively, not via "features". Print a warning if these "features" settings are encountered. So far these "features" sett

[dm-devel] [PATCH v4 07/11] multipath.conf.5: Remove ??? and other minor fixes

2017-06-22 Thread Martin Wilck
Remove the FIXME markers by filling in missing content, and make some other minor fixes. Signed-off-by: Martin Wilck Acked-by: Benjamin Marzinski Reviewed-by: Hannes Reinecke --- multipath/multipath.conf.5 | 48 +- 1 file changed, 26 insertions(+), 2

[dm-devel] [PATCH v4 09/11] libmultipath: retain_attached_hw_handler obsolete with 4.3+

2017-06-22 Thread Martin Wilck
Kernels 4.3 and newer (commit 1bab0de0 "dm-mpath, scsi_dh: don't let dm detach device handlers") imply "retain_attached_hw_handler yes". Clarify this in the propsel code, log messages, and documentation. Signed-off-by: Martin Wilck Reviewed-by: Hannes Reinecke --- libmultipath/configure.c |

[dm-devel] [PATCH v4 00/11] multipath-tools: no_path_retry/queue_if_no_path/hwhandler logic

2017-06-22 Thread Martin Wilck
This patch set attempts to sanitize the logic used for consistently handling options that can be set both via the "features" string and explicit multipath.conf options. This is most prominently "no_path_retry" vs. "queue_if_no_path", but also "retain_attached_hw_handler" vs. the feature of the sa

[dm-devel] [PATCH v4 10/11] libmultipath: don't try to set hwhandler if it is retained

2017-06-22 Thread Martin Wilck
Setting a device handler only works if retain_attached_hw_handler is 'no', or if the kernel didn't auto-assign a handler. If this is not the case, don't even attempt to set a different handler. This requires reading the sysfs "dh_state" path attribute. Signed-off-by: Martin Wilck --- libmultipa

Re: [dm-devel] [PATCH v3 10/11] libmultipath: don't try to set hwhandler if it is retained

2017-06-22 Thread Martin Wilck
On Thu, 2017-06-22 at 08:21 +0200, Hannes Reinecke wrote: > On 06/21/2017 05:06 PM, Martin Wilck wrote: > > Setting a device handler only works if retain_attached_hw_handler > > is 'no', or if the kernel didn't auto-assign a handler. If this > > is not the case, don't even attempt to set a differen

Re: [dm-devel] [PATCH v3 11/11] libmultipath: don't [un]set queue_if_no_path after domap

2017-06-22 Thread Martin Wilck
On Thu, 2017-06-22 at 08:23 +0200, Hannes Reinecke wrote: > On 06/21/2017 05:06 PM, Martin Wilck wrote: > > We set the queue_if_no_path feature in assemble_map() already, > > no need to set it here again. > > > > Signed-off-by: Martin Wilck > > --- > > libmultipath/configure.c | 15 -