All of lore.kernel.org
 help / color / mirror / Atom feed
* [Drbd-dev] Re: reboot notifier
       [not found] <mailman.93.1154590245.4693.drbd-dev@lists.linbit.com>
@ 2006-08-03  8:20 ` Lars Ellenberg
       [not found]   ` <1154593867.2335.20.camel@shadowfox.linsyssoft.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Ellenberg @ 2006-08-03  8:20 UTC (permalink / raw)
  To: drbd-dev

> From: Milind Dumbare <milind@linsyssoft.com>
> To: drbd-dev@lists.linbit.com
> Date: Thu, 03 Aug 2006 13:03:33 +0530
> Message-Id: <1154590413.2335.14.camel@shadowfox.linsyssoft.com>
> 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.
> 
> + 	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?

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

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

* Re: [Drbd-dev] Re: reboot notifier
       [not found]   ` <1154593867.2335.20.camel@shadowfox.linsyssoft.com>
@ 2006-08-03 10:33     ` Lars Ellenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ellenberg @ 2006-08-03 10:33 UTC (permalink / raw)
  To: drbd-dev

/ 2006-08-03 14:01:07 +0530
\ Milind Dumbare:
> 	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.

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

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

end of thread, other threads:[~2006-08-03 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.93.1154590245.4693.drbd-dev@lists.linbit.com>
2006-08-03  8:20 ` [Drbd-dev] Re: reboot notifier Lars Ellenberg
     [not found]   ` <1154593867.2335.20.camel@shadowfox.linsyssoft.com>
2006-08-03 10:33     ` Lars Ellenberg

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.