<div dir="ltr">Patch 1 to 9 are now merged.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 22, 2017 at 4:59 PM, Martin Wilck <span dir="ltr"><<a href="mailto:mwilck@suse.com" target="_blank">mwilck@suse.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch set attempts to sanitize the logic used for consistently handling<br>
options that can be set both via the "features" string and explicit multipath.conf<br>
options. This is most prominently "no_path_retry" vs. "queue_if_no_path", but also<br>
"retain_attached_hw_handler" vs. the feature of the same name.<br>
<br>
The logic this patch set follows is:<br>
 - If "no_path_retry" is set to any value, "queue_if_no_path" is ignored<br>
   (this is the case nowadays for almost all "real" storage arrays, thanks to hwtable).<br>
 - Otherwise, if "queue_if_no_path" is set, treat it like "no_path_retry queue".<br>
<br>
... likewise for "retain_attached_hw_handler".<br>
<br>
In the long run, we should get rid of the "features" settings duplicating<br>
configuration options altogether; the patch set prepares this by printing<br>
warning messages.<br>
<br>
The logic is implemented in the new function reconcile_features_with_<wbr>options,<br>
which is called from both select_features() and merge_hwe(). In setup_map(),<br>
we need to call select_features() after select_no_path_retry() to make this work.<br>
The actual feature setting for device-mapper is made in assemble_map(), the<br>
patch set also fixes the logic there.<br>
<br>
The patch set documents the behavior in the man page, and adds some more<br>
man page fixes.<br>
<br>
By skipping superfluous default initializations in load_config(), the<br>
log messages for the respective config settings become more appropriate.<br>
<br>
The logic for setting hardware handler is also improved. Since kernel 4.3,<br>
"retain_attached_hw_handler yes" is implicitly set by the kernel, and setting<br>
the hardware handler from user space is only possible in special situations.<br>
Acknowledge that in multipathd, and don't try to set or unset either this<br>
feature or the hwhandler attribute itself if it's doomed to fail.<br>
<br>
Review and comments are highly welcome.<br>
<br>
Changes wrt v1:<br>
  - Suggestions from Ben Marzinski:<br>
    * Made sure "multipathd show config" still works (1/8).<br>
    * Fixed logging for default setting of "max_sectors" (1/8)<br>
    * Consistent internal treatment of mp->features (3/8, 4/8)<br>
    * Fixed whitespace error (6/8)<br>
    * Added deprecated warnings (8/8)<br>
  - Made sure the same logic is used in propsel.c and config.c by<br>
    calling the same function (3/8, 4/8)<br>
  - Added deprecated warnings (8/8)<br>
<br>
Changes wrt v2:<br>
 - Added Acked-by:/Reviewed-by: tags<br>
 - 1/11: clarify comment in select_max_sectors_kb (Hannes Reinecke)<br>
 - 3/11: call select_retain_hwhandler before select_features<br>
 - 8/11: don't suggest using retain_attached_hw_handler in log msg<br>
 - 9/11, 10/11, 11/11: new<br>
<br>
Changes wrt v3:<br>
 - Added Reviewed-by: tags (kept Ben's Ack in 4/11 although patch slightly changed)<br>
 - 4/11: use a buffer on stack rather than malloc (Hannes Reinecke)<br>
 - 10/11: Simplify by checking dh_state only in select_handler (Hannes Reinecke)<br>
<br>
Martin Wilck (11):<br>
  libmultipath: load_config: skip setting unnecessary defaults<br>
  libmultipath: add/remove_feature: use const char* for feature<br>
  libmultipath: clarify option conflicts for "features"<br>
  libmultipath: merge_hwe: fix queue_if_no_path logic<br>
  libmultipath: assemble_map: fix queue_if_no_path logic<br>
  multipath.conf.5: document no_path_retry vs. queue_if_no_path<br>
  multipath.conf.5: Remove ??? and other minor fixes<br>
  libmultipath: add deprecated warning for some features settings<br>
  libmultipath: retain_attached_hw_handler obsolete with 4.3+<br>
  libmultipath: don't try to set hwhandler if it is retained<br>
  libmultipath: don't [un]set queue_if_no_path after domap<br>
<br>
 libmultipath/config.c      |  31 +++---------<br>
 libmultipath/configure.c   |  28 ++++-------<br>
 libmultipath/dict.c        |  11 +++--<br>
 libmultipath/dmparser.c    |   8 +--<br>
 libmultipath/propsel.c     | 121 ++++++++++++++++++++++++++++++<wbr>+++++++++------<br>
 libmultipath/propsel.h     |   3 ++<br>
 libmultipath/structs.c     |  30 +++++------<br>
 libmultipath/structs.h     |   4 +-<br>
 libmultipath/util.c        |  36 ++++++++++++++<br>
 libmultipath/util.h        |   2 +<br>
 multipath/multipath.conf.5 |  67 +++++++++++++++----------<br>
 11 files changed, 231 insertions(+), 110 deletions(-)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.13.1<br>
<br>
</font></span></blockquote></div><br></div>