Date: Fri, 28 May 2004 12:25:25 +0400 From: Gleb Smirnoff <glebius@cell.sick.ru> To: Julian Elischer <julian@elischer.org> Cc: Harti Brandt <harti@freebsd.org> Subject: Re: shutdown node VS disconnect all hooks Message-ID: <20040528082525.GA42468@cell.sick.ru> In-Reply-To: <Pine.BSF.4.21.0405280113400.63204-100000@InterJet.elischer.org> References: <Pine.GSO.4.60.0405280925170.18426@zeus> <Pine.BSF.4.21.0405280113400.63204-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 28, 2004 at 01:15:06AM -0700, Julian Elischer wrote: J> > JE>> So, what about adding one more netgraph method into struct ng_type, say J> > JE>> ng_preshutdown_t? This method is called first in ng_rmnode(), and then J> > JE>> current shutdown sequence is followed. We will set it to NULL in all existing J> > JE>> nodes, and create a method in ng_tee, which calls ng_bypass(). Future J> > JE>> implementations may use this method to send "goodbye" messages down hooks when J> > JE>> shutting down. J> > JE> J> > JE>That sounds like a much better solution. Node shutdown is done in 2 J> > JE>parts just as node connection is done in 2 parts. J> > JE> J> > JE>> And this will be a POLA-friendly solution - we will not lose functionality J> > JE>> of RELENG_4 (which mpd relies on), and we will not break nodes which J> > JE>> rely on current shutdown sequence. J> > JE>> J> > JE>> What's your opinion? If it is positive - I'll send patches. J> > JE>> J> > JE> J> > JE>That is a very workable solution. J> > J> > If you do that, I suppose you need to edit all the nodes, right?. In that J> > case could you please convert the initialisation of the typestructs J> > to use C99 sparse initialisation? In that case future changes will be a good J> > deal easier. J> J> actually I don't know if you do need to edit the nodes J> types.. At one time it was true that unassigned elements on J> the end will be NULL. I like idea of sparse initialization. We already have this in ng_hub.c. Julian, if you don't mind, I'll create diff moving all initializations to C99 sparse type. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040528082525.GA42468>