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

2017-06-22 Thread Hannes Reinecke
On 06/21/2017 05:06 PM, Martin Wilck wrote:
> 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 
> ---
>  libmultipath/dmparser.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
> index ba09dc72..1121c715 100644
> --- a/libmultipath/dmparser.c
> +++ b/libmultipath/dmparser.c
> @@ -89,13 +89,12 @@ assemble_map (struct multipath * mp, char * params, int 
> len)
>* We have to set 'queue_if_no_path' here even
>* to avoid path failures during map reload.
>*/
> - if (mp->no_path_retry == NO_PATH_RETRY_UNDEF ||
> - mp->no_path_retry == NO_PATH_RETRY_FAIL) {
> + if (mp->no_path_retry == NO_PATH_RETRY_FAIL) {
>   /* remove queue_if_no_path settings */
>   condlog(3, "%s: remove queue_if_no_path from '%s'",
>   mp->alias, mp->features);
>   remove_feature(, no_path_retry);
> - } else {
> + } else if (mp->no_path_retry != NO_PATH_RETRY_UNDEF) {
>   add_feature(, no_path_retry);
>   }
>   if (mp->retain_hwhandler == RETAIN_HWHANDLER_ON)
> 
Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
-- 
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. 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 v3 05/11] libmultipath: assemble_map: fix queue_if_no_path logic

2017-06-21 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 
---
 libmultipath/dmparser.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index ba09dc72..1121c715 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -89,13 +89,12 @@ assemble_map (struct multipath * mp, char * params, int len)
 * We have to set 'queue_if_no_path' here even
 * to avoid path failures during map reload.
 */
-   if (mp->no_path_retry == NO_PATH_RETRY_UNDEF ||
-   mp->no_path_retry == NO_PATH_RETRY_FAIL) {
+   if (mp->no_path_retry == NO_PATH_RETRY_FAIL) {
/* remove queue_if_no_path settings */
condlog(3, "%s: remove queue_if_no_path from '%s'",
mp->alias, mp->features);
remove_feature(, no_path_retry);
-   } else {
+   } else if (mp->no_path_retry != NO_PATH_RETRY_UNDEF) {
add_feature(, no_path_retry);
}
if (mp->retain_hwhandler == RETAIN_HWHANDLER_ON)
-- 
2.13.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel