Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] DRBD8: disconnecting while already disconnecting can hang the receiver
@ 2007-11-18 23:11 Montrose, Ernest
  2007-11-27 10:36 ` Philipp Reisner
  2007-11-27 13:06 ` Montrose, Ernest
  0 siblings, 2 replies; 9+ messages in thread
From: Montrose, Ernest @ 2007-11-18 23:11 UTC (permalink / raw)
  To: drbd-dev


[-- Attachment #1.1: Type: text/plain, Size: 519 bytes --]

Hi all,
There is problem that manifest itself this way:
 
Consider 2 nodes A and B,  "A" issues a disconnect to r2, B gets into drbd_receiver.c: drbd_disconnect().  While B is disconnecting,
it gets a "disconnect" request for r2.  This hangs the receiver.
 
I am thinking that we should just not allow the state transition to "disconnecting" if we are already doing so. We could redefine "Standalone" to mean
less then or equal to "TearDown" in some cases.  I include a patch to show this.
 
Thanks,
 
EM--

[-- Attachment #1.2: Type: text/html, Size: 963 bytes --]

[-- Attachment #2: drbdsetup_hang.patch --]
[-- Type: text/plain, Size: 494 bytes --]

Index: drbd/drbd_main.c
===================================================================
--- drbd/drbd_main.c	(revision 20723)
+++ drbd/drbd_main.c	(working copy)
@@ -589,7 +589,7 @@
 	if( (ns.conn == StartingSyncT || ns.conn == StartingSyncS ) &&
 	    os.conn > Connected) rv=SS_ResyncRunning;
 
-	if( ns.conn == Disconnecting && os.conn == StandAlone)
+	if( ns.conn == Disconnecting && os.conn <= TearDown )
 		rv=SS_AlreadyStandAlone;
 
 	if( ns.disk > Attaching && os.disk == Diskless)

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

end of thread, other threads:[~2007-11-28 14:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 23:11 [Drbd-dev] DRBD8: disconnecting while already disconnecting can hang the receiver Montrose, Ernest
2007-11-27 10:36 ` Philipp Reisner
2007-11-27 13:06 ` Montrose, Ernest
2007-11-27 14:52   ` Philipp Reisner
2007-11-27 15:06   ` Montrose, Ernest
2007-11-27 21:51   ` Montrose, Ernest
2007-11-28  0:26     ` Lars Ellenberg
2007-11-28 13:09     ` Philipp Reisner
2007-11-28 14:08     ` Montrose, Ernest

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox