reboot notifier
A message that is not in the archive (sent off-list or not yet received): [email protected]
Lars Ellenberg
maintainerQuoted 11 lines
From: Milind Dumbare <[email protected]>
To: [email protected]
Date: Thu, 03 Aug 2006 13:03:33 +0530
Message-Id: <[email protected]>
X-Mailer: Evolution 2.6.0 (2.6.0-1)Hi all,
"drbd_cleanup" function can be called from "drbd_notify_sys" in default
reboot case, for the sake of flow structuring.
Cleanup will be done when rebooting.
Review
Quoted 6 lines
(quoted diff) +6
-0+ switch(code) { + case SYS_RESTART: + default: + drbd_cleanup(); + break + }
yes of course it could.
what do we gain?
if it is an orderly shutdown, the init scripts would have down'ed drbd already, so this notifier would never be called, because it is no longer there. if the shutdown is not so orderly: we cannot "just call drbd_cleanup", since we may still be primary, or connected or both or...
I probably just don't get your point?
Signature · 3 lines
: Lars Ellenberg Tel +43-1-8178292-55 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com :
A message that is not in the archive (sent off-list or not yet received): [email protected]
Lars Ellenberg
maintainer/ 2006-08-03 14:01:07 +0530
\ Milind Dumbare:
Quoted 4 lines
My point was code structuring. As this is the way reboot notifiers are
written. But for doing interesting things in notify functions, it will be nice to have switch cases structured, rather than writing function which is doing nothing.
great. having switch statements which do the wrong thing is good, because the code is more nicely structured. wow.
don't get me wrong. I put that function there, so once we know something "interessting" that we want/need to do on reboot, I don't need to remember how to implement those notifiers.
but before we put some functional code in there, maybe we should first figure out what those "interesting things" are, that we want/need to do on notification.
I'm open for suggestions.
however, just calling drbd_cleanup there unconditionally is not useful.
Signature · 3 lines
: Lars Ellenberg Tel +43-1-8178292-55 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com :