Skip to contentSkip to conversation

reboot notifier

Drbd-dev Lars Ellenberg 1 participant 2 messages Aug 3, 2006 2 messages not in the archive DRBD driver

lore
Share & tools
lore

Lars Ellenberg

author maintainer
#1 lore raw
In reply to a message not in the archive
Quoted 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 :
author maintainer
#3 lore raw
In reply to a message not in the archive

/ 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 :