All of lore.kernel.org
 help / color / mirror / Atom feed
* dm-multipath: del/add map problem
@ 2006-02-21 21:38 Benjamin Marzinski
  2006-02-21 22:39 ` Benjamin Marzinski
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Marzinski @ 2006-02-21 21:38 UTC (permalink / raw)
  To: dm-devel

When you delete a multipath map, orphaning the path clears out some members
of the path structure.  Adding that map again doesn't bring them back.
Specifically, you loose your checker file descriptor.

The attached patch restores most of the members. It doesn't reset getuid.
I don't see why that gets cleared in the first place?  Actually, I don't
see why most of these get cleared, but I didn't look too hard, so I might
just be missing the reason.

Note: I cannot get multipathd add the map if it doesn't already exist in
device mapper, which I assume that I'm supposed to be able to do. To see
this bug, I need to re-add the map with multipath before re-adding it in
multipathd. I'll look into that right after I clean up my next patch.

-Ben

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

* Re: dm-multipath: del/add map problem
  2006-02-21 21:38 dm-multipath: del/add map problem Benjamin Marzinski
@ 2006-02-21 22:39 ` Benjamin Marzinski
  2006-02-25 14:09   ` Christophe Varoqui
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Marzinski @ 2006-02-21 22:39 UTC (permalink / raw)
  To: dm-devel

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

On Tue, Feb 21, 2006 at 03:38:05PM -0600, Benjamin Marzinski wrote:
> When you delete a multipath map, orphaning the path clears out some members
> of the path structure.  Adding that map again doesn't bring them back.
> Specifically, you loose your checker file descriptor.
> 
> The attached patch restores most of the members. It doesn't reset getuid.
> I don't see why that gets cleared in the first place?  Actually, I don't
> see why most of these get cleared, but I didn't look too hard, so I might
> just be missing the reason.
> 
> Note: I cannot get multipathd add the map if it doesn't already exist in
> device mapper, which I assume that I'm supposed to be able to do. To see
> this bug, I need to re-add the map with multipath before re-adding it in
> multipathd. I'll look into that right after I clean up my next patch.
> 
> -Ben

oops. Forgot to attach the patch. Here it is.

[-- Attachment #2: adopt.patch --]
[-- Type: text/plain, Size: 500 bytes --]

diff -urpN mp-devel-clean/libmultipath/structs_vec.c mp-devel-patched/libmultipath/structs_vec.c
--- mp-devel-clean/libmultipath/structs_vec.c	2006-02-17 16:07:19.000000000 -0600
+++ mp-devel-patched/libmultipath/structs_vec.c	2006-02-21 16:05:59.000000000 -0600
@@ -67,6 +67,7 @@ adopt_paths (vector pathvec, struct mult
 			if (!find_path_by_dev(mpp->paths, pp->dev) &&
 			    store_path(mpp->paths, pp))
 					return 1;
+			pathinfo(pp, conf->hwtable, DI_PRIO | DI_CHECKER);
 		}
 	}
 	return 0;

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: Re: dm-multipath: del/add map problem
  2006-02-21 22:39 ` Benjamin Marzinski
@ 2006-02-25 14:09   ` Christophe Varoqui
  0 siblings, 0 replies; 3+ messages in thread
From: Christophe Varoqui @ 2006-02-25 14:09 UTC (permalink / raw)
  To: device-mapper development

Le mardi 21 février 2006 à 16:39 -0600, Benjamin Marzinski a écrit :
> On Tue, Feb 21, 2006 at 03:38:05PM -0600, Benjamin Marzinski wrote:
> > When you delete a multipath map, orphaning the path clears out some members
> > of the path structure.  Adding that map again doesn't bring them back.
> > Specifically, you loose your checker file descriptor.
> > 
> > The attached patch restores most of the members. It doesn't reset getuid.
> > 
...
> oops. Forgot to attach the patch. Here it is.
> --
Applied, thanks.

Regards,
cvaroqui

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

end of thread, other threads:[~2006-02-25 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-21 21:38 dm-multipath: del/add map problem Benjamin Marzinski
2006-02-21 22:39 ` Benjamin Marzinski
2006-02-25 14:09   ` 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.