All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multipath: check setup_multipath return value.
@ 2011-07-13 18:30 Benjamin Marzinski
  2011-09-01  2:50 ` Benjamin Marzinski
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Marzinski @ 2011-07-13 18:30 UTC (permalink / raw)
  To: device-mapper development

When setup_multipath() fails, it removes the map. So update_path_groups()
needs check the return value, and fail without touching the map anymore if
setup_multipath() fails.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: multipath-tools-110713/multipathd/main.c
===================================================================
--- multipath-tools-110713.orig/multipathd/main.c
+++ multipath-tools-110713/multipathd/main.c
@@ -1060,7 +1060,8 @@ int update_path_groups(struct multipath 
 		return 1;
 	}
 	dm_lib_release();
-	setup_multipath(vecs, mpp);
+	if (setup_multipath(vecs, mpp) != 0)
+		return 1;
 	sync_map_state(mpp);
 
 	return 0;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] multipath: check setup_multipath return value.
  2011-07-13 18:30 [PATCH] multipath: check setup_multipath return value Benjamin Marzinski
@ 2011-09-01  2:50 ` Benjamin Marzinski
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Marzinski @ 2011-09-01  2:50 UTC (permalink / raw)
  To: device-mapper development; +Cc: Christophe Varoqui

Christophe, would it be possible to get this merged?

Thanks,
-Ben

On Wed, Jul 13, 2011 at 01:30:42PM -0500, Benjamin Marzinski wrote:
> When setup_multipath() fails, it removes the map. So update_path_groups()
> needs check the return value, and fail without touching the map anymore if
> setup_multipath() fails.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
>  multipathd/main.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: multipath-tools-110713/multipathd/main.c
> ===================================================================
> --- multipath-tools-110713.orig/multipathd/main.c
> +++ multipath-tools-110713/multipathd/main.c
> @@ -1060,7 +1060,8 @@ int update_path_groups(struct multipath 
>  		return 1;
>  	}
>  	dm_lib_release();
> -	setup_multipath(vecs, mpp);
> +	if (setup_multipath(vecs, mpp) != 0)
> +		return 1;
>  	sync_map_state(mpp);
>  
>  	return 0;
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-01  2:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 18:30 [PATCH] multipath: check setup_multipath return value Benjamin Marzinski
2011-09-01  2:50 ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.