[DRBD-cvs] svn commit by phil - r2564 - trunk/drbd - "drbdadm
disconnect " was not working correct, because
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Tue Oct 24 16:09:29 CEST 2006
Author: phil
Date: 2006-10-24 16:09:28 +0200 (Tue, 24 Oct 2006)
New Revision: 2564
Modified:
trunk/drbd/drbd_int.h
trunk/drbd/drbd_main.c
Log:
"drbdadm disconnect " was not working correct, because there are
too many wakeups on the cstate_wait. Introduced a new wait queue.
Modified: trunk/drbd/drbd_int.h
===================================================================
--- trunk/drbd/drbd_int.h 2006-10-24 12:41:41 UTC (rev 2563)
+++ trunk/drbd/drbd_int.h 2006-10-24 14:09:28 UTC (rev 2564)
@@ -778,6 +778,7 @@
drbd_state_t new_state_tmp; // Used after attach while negotiating new disk state.
drbd_state_t state;
wait_queue_head_t cstate_wait; // TODO Rename into "misc_wait".
+ wait_queue_head_t state_wait; // upon each state change.
unsigned int send_cnt;
unsigned int recv_cnt;
unsigned int read_cnt;
Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c 2006-10-24 12:41:41 UTC (rev 2563)
+++ trunk/drbd/drbd_main.c 2006-10-24 14:09:28 UTC (rev 2564)
@@ -462,7 +462,7 @@
return rv;
}
- wait_event(mdev->cstate_wait,(rv=_req_st_cond(mdev,mask,val)));
+ wait_event(mdev->state_wait,(rv=_req_st_cond(mdev,mask,val)));
if( rv < SS_Success ) {
// nearly dead code.
@@ -758,6 +758,7 @@
mdev->state.i = ns.i;
wake_up(&mdev->cstate_wait);
+ wake_up(&mdev->state_wait);
/** post-state-change actions **/
if ( os.conn >= SyncSource && ns.conn <= Connected ) {
@@ -1969,6 +1970,7 @@
mdev->md_sync_timer.data = (unsigned long) mdev;
init_waitqueue_head(&mdev->cstate_wait);
+ init_waitqueue_head(&mdev->state_wait);
init_waitqueue_head(&mdev->ee_wait);
init_waitqueue_head(&mdev->al_wait);
init_waitqueue_head(&mdev->seq_wait);
More information about the drbd-cvs
mailing list