[Pvfs2-cvs] commit by slang in pvfs2/src/io/trove/trove-dbpf: dbpf-bstream.c

CVS commit program cvs at parl.clemson.edu
Mon Jul 21 15:33:37 EDT 2008


Update of /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf
In directory parlweb1:/tmp/cvs-serv21978/src/io/trove/trove-dbpf

Modified Files:
	dbpf-bstream.c 
Log Message:
remove cache invalidate at beginning of write operation.  We don't actually need to do this, and its forcing a stat() of the bstream for getattr ops that occur during a write operation.


Index: dbpf-bstream.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c,v
diff -p -u -r1.80 -r1.81
--- dbpf-bstream.c	1 Jun 2007 20:58:05 -0000	1.80
+++ dbpf-bstream.c	21 Jul 2008 19:33:37 -0000	1.81
@@ -601,11 +601,14 @@ static int dbpf_bstream_write_at_op_svc(
         goto return_error;
     }
 
-    /* remove cached attribute for this handle if it's present */
+    /* remove cached attribute for this handle if it's present 
+
     gen_mutex_lock(&dbpf_attr_cache_mutex);
     dbpf_attr_cache_remove(ref);
     gen_mutex_unlock(&dbpf_attr_cache_mutex);
 
+    */
+
     DBPF_ERROR_SYNC_IF_NECESSARY(op_p, tmp_ref.fd);
 
     dbpf_open_cache_put(&tmp_ref);
@@ -1006,16 +1009,22 @@ inline int dbpf_bstream_rw_list(TROVE_co
     q_op_p->op.u.b_rw_list.fd = q_op_p->op.u.b_rw_list.open_ref.fd;
 
     /*
-      if we're doing an i/o write, remove the cached attribute for
-      this handle if it's present
-    */
-    if (opcode == LIO_WRITE)
-    {
-        TROVE_object_ref ref = {handle, coll_id};
-        gen_mutex_lock(&dbpf_attr_cache_mutex);
-        dbpf_attr_cache_remove(ref);
-        gen_mutex_unlock(&dbpf_attr_cache_mutex);
-    }
+     * if we're doing an i/o write, remove the cached attribute for
+     * this handle if it's present
+     *
+     * NOTE (07/21/08): we don't actually need to invalidate the cache
+     * (including the cached bstream size) because the metadata (bstream
+     * size and modification time) can be atomically updated at the completion
+     * of the write operation.
+     *
+     * if (opcode == LIO_WRITE)
+     * {
+     *   TROVE_object_ref ref = {handle, coll_id};
+     *   gen_mutex_lock(&dbpf_attr_cache_mutex);
+     *   dbpf_attr_cache_remove(ref);
+     *   gen_mutex_unlock(&dbpf_attr_cache_mutex);
+     * }
+     */
 
 #ifndef __PVFS2_TROVE_AIO_THREADED__
 



More information about the Pvfs2-cvs mailing list