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

CVS commit program cvs at parl.clemson.edu
Tue Nov 28 13:08:32 EST 2006


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

Modified Files:
	dbpf-keyval.c dbpf-mgmt.c 
Log Message:
change remove dir check for non-empty dir.  We used to get the count, now we do a keyval iterate with a max count of 1.  If entries exist, the iterate will return a count of 1.  This allows the rmdir to succeed if a dirent count gets out of sync somehow.  dirent counts are only used by getattr now.


Index: dbpf-keyval.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-keyval.c,v
diff -p -u -r1.78 -r1.79
--- dbpf-keyval.c	22 Sep 2006 19:27:31 -0000	1.78
+++ dbpf-keyval.c	28 Nov 2006 18:08:32 -0000	1.79
@@ -59,7 +59,9 @@ extern int synccount;
  * symlink       COMMON      "st"                      Target Handle
  * directory     COMMON      "de"                      Entries Handle
  * dir-ent       COMPONENT   <component name>          Entry Handle
- * ALL           XATTR       <extended attribute name> <extended attribute content>
+ * [metafile, 
+ *  symlink, 
+ *  directory]   XATTR       <extended attribute name> <extended attribute content>
  *
  * The descriptions for the common keys are:
  *

Index: dbpf-mgmt.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-mgmt.c,v
diff -p -u -r1.95 -r1.96
--- dbpf-mgmt.c	23 Oct 2006 21:28:43 -0000	1.95
+++ dbpf-mgmt.c	28 Nov 2006 18:08:32 -0000	1.96
@@ -120,7 +120,11 @@ retry:
     {
         /* user wants the standard db cache which uses mmap */
         ret = dbenv->open(dbenv, path, 
-                          DB_INIT_MPOOL|DB_CREATE|DB_THREAD, 0);
+                          DB_INIT_MPOOL|
+                          DB_CREATE|
+                          DB_THREAD|
+                          DB_INIT_CDB, 
+                          0);
         if(ret != 0)
         {
             gossip_err("dbpf_getdb_env(%s): %s\n", path, db_strerror(ret));
@@ -143,7 +147,12 @@ retry:
         }
 
         ret = dbenv->open(dbenv, path, 
-                             DB_INIT_MPOOL|DB_CREATE|DB_THREAD|DB_SYSTEM_MEM, 0);
+                          DB_INIT_MPOOL|
+                          DB_CREATE|
+                          DB_THREAD|
+                          DB_SYSTEM_MEM|
+                          DB_INIT_CDB, 
+                          0);
         /* In some cases (oddly configured systems with pvfs2-server running as
          * non-root) DB_SYSTEM_MEM, which uses sysV shared memory, can fail
          * with EAGAIN (resource temporarily unavailable).   berkely DB can use
@@ -182,7 +191,11 @@ retry:
                 return NULL;
             }
             assert(my_storage_p != NULL);
-            ret = dbenv->open(dbenv, path, DB_CREATE|DB_THREAD|DB_PRIVATE, 0);
+            ret = dbenv->open(dbenv, path, 
+                              DB_CREATE|
+                              DB_THREAD|
+                              DB_PRIVATE, 
+                              0);
         }
 
         if(ret == DB_RUNRECOVERY)



More information about the Pvfs2-cvs mailing list