[DRBD-cvs] svn commit by phil - r2475 - trunk/drbd - 'drbdadm
diconnect r0' returned before the state actual
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Thu Sep 28 13:18:40 CEST 2006
Author: phil
Date: 2006-09-28 13:18:39 +0200 (Thu, 28 Sep 2006)
New Revision: 2475
Modified:
trunk/drbd/drbd_nl.c
Log:
'drbdadm diconnect r0' returned before the state actually arrived
at StandAlone. Therefore a subsequent 'drbdadm connect r0' could fail.
Fixed that. The drbd_nl_disconnect() function now waits until DRBD
has reached the StandAlone state.
Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c 2006-09-28 09:46:16 UTC (rev 2474)
+++ trunk/drbd/drbd_nl.c 2006-09-28 11:18:39 UTC (rev 2475)
@@ -1124,6 +1124,12 @@
if( retcode < SS_Success ) goto fail;
+ if( wait_event_interruptible( mdev->cstate_wait,
+ mdev->state.conn==StandAlone) ) {
+ retcode = GotSignal;
+ goto fail;
+ }
+
done:
retcode = NoError;
fail:
More information about the drbd-cvs
mailing list