[DRBD-cvs] drbd by phil; * Moved wake_up_interruptible(&mdev->ee_...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Fri, 9 Apr 2004 13:44:22 +0200 (CEST)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_receiver.c
Log Message:
* Moved wake_up_interruptible(&mdev->ee_wait); into drbd_put_ee()
With drbd-0.7 this was the reason for a deadlock. On a
SyncSource node, it could happen that all EEs are used to
read data from the disk. In w_e_end_rsdata_req() there is just a
call to drbd_put_ee() but not call to wake_up_interruptible(&mdev->ee_wait);
And in the meantime the receiver thread went to sleep on ee_wait
because it did not got any EEs.
I think this is fixed now.
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.128
retrieving revision 1.97.2.129
diff -u -3 -r1.97.2.128 -r1.97.2.129
--- drbd_receiver.c 6 Apr 2004 14:07:00 -0000 1.97.2.128
+++ drbd_receiver.c 9 Apr 2004 11:44:16 -0000 1.97.2.129
@@ -311,6 +311,8 @@
__free_page(drbd_free_ee(mdev,&mdev->free_ee));
}
}
+
+ wake_up_interruptible(&mdev->ee_wait);
}
/* It is important that the head list is really empty when returning,
@@ -345,7 +347,6 @@
}
clear_bit(PROCESS_EE_RUNNING,&mdev->flags);
- wake_up_interruptible(&mdev->ee_wait);
return ok;
}