[dm-devel] Re: update for shared path checker context

Christophe Varoqui christophe.varoqui at free.fr
Tue Nov 21 00:02:55 UTC 2006


Le vendredi 17 novembre 2006 à 11:21 -0500, Edward Goggin a écrit :
> Christophe,
> 
> I made the following changes.
> 
> modified the path checker interface so that each path checker
> type could specify the size of their shared path context area
> 
> discovery.c:get_state() now returns without setting path state
> if the path's mpp pointer is not set (IFF PP_DAEMON) else it
> becomes tricky to update the path checker's ptr to the shared
> context area after the path checker has been already initialized.
> 
> structs.c:free_multipath() now frees shared context area if it was
> allocated.
> 
Wouldn't a void** mpcontext in struct multipath instead of a void* keep
us from resorting to those ->size_scxt fonctions ?

- mpcontext allocation is deported insode the checker, so only the
checker needing the facility have to care.
- mpcontext freeing in free_multipath is ok, I guess

Something like the attached patch, for example.
(extreme hack to readsector0 to showcase the facility)

Regards,
cvaroqui

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-mpcontext.diff
Type: text/x-patch
Size: 3389 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20061121/4539940e/attachment.bin>


More information about the dm-devel mailing list