[Pvfs2-cvs] commit by slang in pvfs2/src/io/trove/trove-dbpf:
dbpf-mgmt.c
CVS commit program
cvs at parl.clemson.edu
Wed Aug 2 11:45:02 EDT 2006
Update of /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf
In directory parlweb1:/tmp/cvs-serv2013/src/io/trove/trove-dbpf
Modified Files:
dbpf-mgmt.c
Log Message:
try to backtrack to private if opening berkeley db with shmem doesn't work
Index: dbpf-mgmt.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-mgmt.c,v
diff -p -u -r1.89 -r1.90
--- dbpf-mgmt.c 13 Jul 2006 16:32:17 -0000 1.89
+++ dbpf-mgmt.c 2 Aug 2006 15:45:01 -0000 1.90
@@ -161,7 +161,7 @@ retry:
ret = dbenv->remove(dbenv, path, DB_FORCE);
if (ret != 0)
{
- gossip_lerr("dbpf_getdb_env(%s): %s\n", path, db_strerror(ret));
+ gossip_lerr("dbpf_remove(%s): %s\n", path, db_strerror(ret));
*error = ret;
return NULL;
}
@@ -169,6 +169,19 @@ retry:
my_storage_p->flags |= TROVE_DB_CACHE_MMAP;
goto retry;
}
+
+ /* berkeley db is sometimes configured without shared memory. If
+ * open returns an EINVAL, retry with DB_PRIVATE.
+ */
+ if(ret == EINVAL) {
+
+ ret = dbenv->remove(dbenv, path, DB_FORCE);
+ if(ret != 0)
+ {
+ gossip_lerr("dbpf_remove(%s): %s\n", path, db_strerror(ret));
+ *error = ret;
+ return NULL;
+ }
if(ret == DB_RUNRECOVERY)
{
More information about the Pvfs2-cvs
mailing list