[DRBD-cvs] svn commit by phil - r2858 - trunk/user - Drbdsetup has to release its drbd-config-lock when it e

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Apr 17 17:51:42 CEST 2007


Author: phil
Date: 2007-04-17 17:51:41 +0200 (Tue, 17 Apr 2007)
New Revision: 2858

Modified:
   trunk/user/drbdsetup.c
Log:
Drbdsetup has to release its drbd-config-lock when it enters the
event loop in the events_cmd().


Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c	2007-04-17 11:40:01 UTC (rev 2857)
+++ trunk/user/drbdsetup.c	2007-04-17 15:51:41 UTC (rev 2858)
@@ -405,6 +405,7 @@
 #undef MAX_ERROR
 
 char* cmdname = 0;
+int lock_fd;
 
 int dump_tag_list(unsigned short *tlc)
 {
@@ -1297,6 +1298,9 @@
 	tl->drbd_p_header->flags = 0;
 	send_cn(sk_nl,tl->nl_header,(char*)tl->tag_list_cpos-(char*)tl->nl_header);
 
+	dt_unlock_drbd(lock_fd); 
+	lock_fd=0;
+
 	do {
 		gettimeofday(&before,NULL);
 		rr = receive_cn(sk_nl, (struct nlmsghdr*)buffer, 4096,timeout_ms );
@@ -1698,7 +1702,6 @@
 int main(int argc, char** argv)
 {
 	int minor;
-	int lock_fd;
 	struct drbd_cmd *cmd;
 	int rv=0;
 



More information about the drbd-cvs mailing list