[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/client/sysint: client-state-machine.c

CVS commit program cvs at parl.clemson.edu
Wed Jan 16 18:57:36 EST 2008


Update of /projects/cvsroot/pvfs2-1/src/client/sysint
In directory parlweb1:/tmp/cvs-serv13831/src/client/sysint

Modified Files:
	client-state-machine.c 
Log Message:
Expanded coverage of a lock within the system interface; I forgot that sm
transitions can be driven at post time, not just at test time.  Last
(currently known anyway) problem with multithreaded sysint usage.


Index: client-state-machine.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/client/sysint/client-state-machine.c,v
diff -p -u -r1.92 -r1.93
--- client-state-machine.c	15 Jan 2008 18:57:39 -0000	1.92
+++ client-state-machine.c	16 Jan 2008 23:57:36 -0000	1.93
@@ -370,6 +370,7 @@ PVFS_error PINT_client_state_machine_pos
     /* save operation type; mark operation as unfinished */
     sm_p->user_ptr = user_ptr;
 
+    gen_mutex_lock(&test_mutex);
     /*
       start state machine and continue advancing while we're getting
       immediate completions
@@ -380,6 +381,7 @@ PVFS_error PINT_client_state_machine_pos
     if(sm_ret < 0)
     {
         /* state machine code failed */
+        gen_mutex_unlock(&test_mutex);
         return sm_ret;
     }
 
@@ -416,6 +418,7 @@ PVFS_error PINT_client_state_machine_pos
                     lld((op_id ? *op_id : -1)),
                     ret);
     }
+    gen_mutex_unlock(&test_mutex);
     return js.error_code;
 }
 



More information about the Pvfs2-cvs mailing list