* dm-multipath [PATCH] "better" return codes.
@ 2006-02-27 21:11 Benjamin Marzinski
2006-03-02 10:44 ` Christophe Varoqui
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Marzinski @ 2006-02-27 21:11 UTC (permalink / raw)
To: dm-devel
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
I think that these multipathd return codes make more sense (failing if the map
is not a multipath map, and not failing if it has already been added).
-Ben
[-- Attachment #2: returns.patch --]
[-- Type: text/plain, Size: 679 bytes --]
diff -urpN mp-devel-clean/multipathd/main.c mp-devel-patched/multipathd/main.c
--- mp-devel-clean/multipathd/main.c 2006-02-27 15:09:55.000000000 -0600
+++ mp-devel-patched/multipathd/main.c 2006-02-27 15:16:13.000000000 -0600
@@ -569,7 +569,7 @@ ev_add_map (char * devname, struct vecto
if (map_present && dm_type(alias, DEFAULT_TARGET) <= 0) {
condlog(4, "%s: not a multipath map", alias);
FREE(alias);
- return 0;
+ return 1;
}
mpp = find_mp_by_alias(vecs->mpvec, alias);
@@ -709,7 +709,7 @@ ev_add_path (char * devname, struct vect
/*
* allow reconfig of orphaned path here
*/
- if (pp->mpp) return 1;
+ if (pp->mpp) return 0;
}
else {
/*
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: dm-multipath [PATCH] "better" return codes.
2006-02-27 21:11 dm-multipath [PATCH] "better" return codes Benjamin Marzinski
@ 2006-03-02 10:44 ` Christophe Varoqui
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2006-03-02 10:44 UTC (permalink / raw)
To: device-mapper development
On Mon, Feb 27, 2006 at 03:11:10PM -0600, Benjamin Marzinski wrote:
> I think that these multipathd return codes make more sense (failing if the map
> is not a multipath map, and not failing if it has already been added).
>
> -Ben
> diff -urpN mp-devel-clean/multipathd/main.c mp-devel-patched/multipathd/main.c
> --- mp-devel-clean/multipathd/main.c 2006-02-27 15:09:55.000000000 -0600
> +++ mp-devel-patched/multipathd/main.c 2006-02-27 15:16:13.000000000 -0600
> @@ -569,7 +569,7 @@ ev_add_map (char * devname, struct vecto
> if (map_present && dm_type(alias, DEFAULT_TARGET) <= 0) {
> condlog(4, "%s: not a multipath map", alias);
> FREE(alias);
> - return 0;
> + return 1;
> }
>
Returning ok here means the event needs no treatment and it's ok.
Seems right to me.
> mpp = find_mp_by_alias(vecs->mpvec, alias);
> @@ -709,7 +709,7 @@ ev_add_path (char * devname, struct vect
> /*
> * allow reconfig of orphaned path here
> */
> - if (pp->mpp) return 1;
> + if (pp->mpp) return 0;
> }
> else {
> /*
Indeed, the comment looks wrong wrt actual code.
Regards,
cvaroqui
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-02 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 21:11 dm-multipath [PATCH] "better" return codes Benjamin Marzinski
2006-03-02 10:44 ` Christophe Varoqui
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.