2006-12-19 00:17:44 +01:00
|
|
|
Support a database-local fsync setting. Needs berkeley db patch.
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
--- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000
|
|
|
|
+++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000
|
|
|
|
@@ -211,11 +211,13 @@ static int db_fini(dbiIndex dbi, const c
|
|
|
|
return rc;
|
|
|
|
}
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
+#if 0
|
2006-12-19 00:17:44 +01:00
|
|
|
static int db3_fsync_disable(/*@unused@*/ int fd)
|
|
|
|
/*@*/
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if HAVE_LIBPTHREAD
|
|
|
|
@@ -414,6 +416,7 @@ static int db_init(dbiIndex dbi, const c
|
|
|
|
/* dbenv->set_rep_transport(???) */
|
|
|
|
/* dbenv->set_rep_limit(???) */
|
|
|
|
|
|
|
|
+#if 0
|
|
|
|
if (dbi->dbi_no_fsync) {
|
|
|
|
#if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4)
|
|
|
|
xx = db_env_set_func_fsync(db3_fsync_disable);
|
|
|
|
@@ -422,6 +425,7 @@ static int db_init(dbiIndex dbi, const c
|
|
|
|
#endif
|
|
|
|
xx = cvtdberr(dbi, "db_env_set_func_fsync", xx, _debug);
|
|
|
|
}
|
2006-12-19 00:17:44 +01:00
|
|
|
+#endif
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
if (dbi->dbi_shmkey) {
|
|
|
|
xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey);
|
|
|
|
--- ./rpmdb/dbconfig.c.orig 2004-10-16 12:50:52.000000000 +0000
|
|
|
|
+++ ./rpmdb/dbconfig.c 2005-12-15 13:12:32.000000000 +0000
|
|
|
|
@@ -99,6 +99,8 @@ struct poptOption rdbOptions[] = {
|
2006-12-19 00:17:44 +01:00
|
|
|
NULL, NULL },
|
2006-12-19 00:17:44 +01:00
|
|
|
{ "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING,
|
2006-12-19 00:17:44 +01:00
|
|
|
NULL, NULL },
|
2006-12-19 00:17:44 +01:00
|
|
|
+ { "nofsync", 0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_NOFSYNC,
|
2006-12-19 00:17:44 +01:00
|
|
|
+ NULL, NULL },
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
{ "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE,
|
|
|
|
NULL, NULL },
|
|
|
|
@@ -145,8 +147,6 @@ struct poptOption rdbOptions[] = {
|
|
|
|
NULL, NULL },
|
|
|
|
{ "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0,
|
|
|
|
NULL, NULL },
|
|
|
|
- { "nofsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_fsync, 0,
|
|
|
|
- NULL, NULL },
|
|
|
|
{ "nodbsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_dbsync, 0,
|
|
|
|
NULL, NULL },
|
|
|
|
{ "lockdbfd", 0,POPT_ARG_NONE, &db3dbi.dbi_lockdbfd, 0,
|