[PVFS2-CVS] commit by neill in pvfs2-1/src/kernel/linux-2.6: dcache.c devpvfs2-req.c file.c pvfs2-utils.c

CVS commit program cvs at parl.clemson.edu
Tue Feb 10 18:12:36 EST 2004


Update of /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6
In directory parlweb:/tmp/cvs-serv2273

Modified Files:
	dcache.c devpvfs2-req.c file.c pvfs2-utils.c 
Log Message:
- address possible race


Index: dcache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/dcache.c,v
diff -p -u -r1.11 -r1.12
--- dcache.c	5 Nov 2003 20:05:06 -0000	1.11
+++ dcache.c	10 Feb 2004 23:12:36 -0000	1.12
@@ -19,7 +19,7 @@ int pvfs2_d_revalidate(
     int ret = 0;
     struct inode *inode = (dentry ? dentry->d_inode : NULL);
 
-/*     pvfs2_print("pvfs2: pvfs2_d_revalidate called\n"); */
+    pvfs2_print("pvfs2: pvfs2_d_revalidate called\n");
 
     if (nd && (nd->flags & LOOKUP_FOLLOW) &&
         (!nd->flags & LOOKUP_CREATE))

Index: devpvfs2-req.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/devpvfs2-req.c,v
diff -p -u -r1.20 -r1.21
--- devpvfs2-req.c	5 Feb 2004 16:55:37 -0000	1.20
+++ devpvfs2-req.c	10 Feb 2004 23:12:36 -0000	1.21
@@ -241,28 +241,28 @@ static ssize_t pvfs2_devreq_writev(
 	    spin_unlock(&op->lock);
 
             /*
-              if this operation is an I/O operation, we need to
-              wait for all data to be copied before we can return
-              to avoid buffer corruption and races that can pull
-              the buffers out from under us.
+              if this operation is an I/O operation, we need to wait
+              for all data to be copied before we can return to avoid
+              buffer corruption and races that can pull the buffers
+              out from under us.
 
-              Essentially we're synchronizing with other parts of
-              the vfs implicitly by not allow the user space
-              application reading/writing this device to return
-              until the buffers are done being used.
+              Essentially we're synchronizing with other parts of the
+              vfs implicitly by not allowing the user space
+              application reading/writing this device to return until
+              the buffers are done being used.
             */
             if (op->upcall.type == PVFS2_VFS_OP_FILE_IO)
             {
                 int timed_out = 0;
                 DECLARE_WAITQUEUE(wait_entry, current);
 
+                set_current_state(TASK_INTERRUPTIBLE);
+
                 add_wait_queue(&op->io_completion_waitq, &wait_entry);
                 wake_up_interruptible(&op->waitq);
 
                 while(1)
                 {
-                    set_current_state(TASK_INTERRUPTIBLE);
-
                     spin_lock(&op->lock);
                     if (op->io_completed)
                     {

Index: file.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/file.c,v
diff -p -u -r1.50 -r1.51
--- file.c	5 Feb 2004 18:18:45 -0000	1.50
+++ file.c	10 Feb 2004 23:12:36 -0000	1.51
@@ -47,9 +47,9 @@ int pvfs2_file_open(
 	return dcache_dir_open(inode, file);
     }
     /*
-       fs/open.c: returns 0 after enforcing large file support
-       if running on a 32 bit system w/o O_LARGFILE flag
-     */
+      fs/open.c: returns 0 after enforcing large file support
+      if running on a 32 bit system w/o O_LARGFILE flag
+    */
     return generic_file_open(inode, file);
 }
 

Index: pvfs2-utils.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/pvfs2-utils.c,v
diff -p -u -r1.46 -r1.47
--- pvfs2-utils.c	9 Feb 2004 21:58:02 -0000	1.46
+++ pvfs2-utils.c	10 Feb 2004 23:12:36 -0000	1.47
@@ -412,10 +412,21 @@ int pvfs2_inode_getattr(
 	}
         ret = new_op->downcall.status;
 
+#if 0 /* DEBUGGING ONLY */
+	printk("**** GETATTR on handle %Lu,%d | inode ct=%d | "
+               "ret=%d | perms=(%d,%d)\n", pvfs2_inode->refn.handle,
+               pvfs2_inode->refn.fs_id,(int)atomic_read(&inode->i_count),
+               ret, (int)inode->i_uid, (int)inode->i_gid);
+#endif
+
       error_exit:
         pvfs2_print(error_exit ? "*** warning: getattr error_exit\n" : "");
 	op_release(new_op);
     }
+/* DEBUGGING ONLY */
+#if 0
+    printk("GETATTR RETURNING %d\n",ret);
+#endif
     return ret;
 }
 



More information about the PVFS2-CVS mailing list