This commit is contained in:
committed by
Git OBS Bridge
parent
090779a064
commit
8e55a85d14
151
db.diff
151
db.diff
@@ -1,82 +1,111 @@
|
||||
--- db/db/db.c.orig 2010-04-12 20:25:22.000000000 +0000
|
||||
+++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000
|
||||
@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags)
|
||||
MAKE_INMEM(dbp);
|
||||
--- db/db/db.c.orig 2004-11-11 15:58:46.000000000 +0000
|
||||
+++ db/db/db.c 2005-12-15 16:17:45.000000000 +0000
|
||||
@@ -591,6 +591,8 @@ __db_dbenv_mpool(dbp, fname, flags)
|
||||
(F_ISSET(dbp, DB_AM_NOT_DURABLE) ? DB_TXN_NOT_DURABLE : 0),
|
||||
0, dbp->pgsize)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
+ if (LF_ISSET(DB_NOFSYNC) && mpf->mfp)
|
||||
+ F_SET(mpf->mfp, MP_NOFSYNC);
|
||||
|
||||
/*
|
||||
* Set the open flag. We use it to mean that the dbp has gone
|
||||
--- db/db/db_iface.c.orig 2010-04-12 20:25:22.000000000 +0000
|
||||
+++ db/db/db_iface.c 2011-05-12 11:21:32.000000000 +0000
|
||||
@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
|
||||
return (0);
|
||||
}
|
||||
--- db/db/db_iface.c.orig 2004-10-16 01:31:54.000000000 +0000
|
||||
+++ db/db/db_iface.c 2005-12-15 16:17:45.000000000 +0000
|
||||
@@ -1068,7 +1068,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
|
||||
#define OKFLAGS \
|
||||
(DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING | \
|
||||
DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY | \
|
||||
+ DB_NOFSYNC | \
|
||||
DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE)
|
||||
if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0)
|
||||
(DB_AUTO_COMMIT | DB_CREATE | DB_DIRTY_READ | DB_EXCL | \
|
||||
DB_FCNTL_LOCKING | DB_NO_AUTO_COMMIT | DB_NOMMAP | DB_RDONLY | \
|
||||
- DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN)
|
||||
+ DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN | DB_NOFSYNC)
|
||||
if ((ret = __db_fchk(dbenv, "DB->open", flags, OKFLAGS)) != 0)
|
||||
return (ret);
|
||||
--- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000
|
||||
+++ db/dbinc/mp.h 2011-05-12 12:01:32.000000000 +0000
|
||||
@@ -467,6 +467,7 @@ struct __mpoolfile {
|
||||
if (LF_ISSET(DB_EXCL) && !LF_ISSET(DB_CREATE))
|
||||
--- db/dbinc/db.in.orig 2004-10-16 01:31:54.000000000 +0000
|
||||
+++ db/dbinc/db.in 2005-12-15 16:17:45.000000000 +0000
|
||||
@@ -260,6 +260,7 @@ struct __db_dbt {
|
||||
#define DB_FCNTL_LOCKING 0x0002000 /* UNDOC: fcntl(2) locking. */
|
||||
#define DB_RDWRMASTER 0x0004000 /* UNDOC: allow subdb master open R/W */
|
||||
#define DB_WRITEOPEN 0x0008000 /* UNDOC: open with write lock. */
|
||||
+#define DB_NOFSYNC 0x0010000 /* UNDOC: don't fsync */
|
||||
|
||||
/*
|
||||
* Flags private to DB_ENV->txn_begin.
|
||||
--- db/dbinc/mp.h.orig 2004-10-16 01:31:54.000000000 +0000
|
||||
+++ db/dbinc/mp.h 2005-12-15 16:25:56.000000000 +0000
|
||||
@@ -309,6 +309,7 @@ struct __mpoolfile {
|
||||
#define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */
|
||||
#define MP_NOT_DURABLE 0x100 /* File is not durable. */
|
||||
#define MP_TEMP 0x200 /* Backing file is a temporary. */
|
||||
+#define MP_NOFSYNC 0x400 /* Don't fsync */
|
||||
+#define MP_NOFSYNC 0x400 /* Don't fsync */
|
||||
u_int32_t flags;
|
||||
};
|
||||
|
||||
--- db/dbinc_auto/api_flags.in.orig 2011-05-12 11:40:57.000000000 +0000
|
||||
+++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000
|
||||
@@ -83,6 +83,7 @@
|
||||
#define DB_NOORDERCHK 0x00000002
|
||||
#define DB_NOPANIC 0x00000800
|
||||
#define DB_NO_AUTO_COMMIT 0x00001000
|
||||
+#define DB_NOFSYNC 0x00040000
|
||||
#define DB_ODDFILESIZE 0x00000080
|
||||
#define DB_ORDERCHKONLY 0x00000004
|
||||
#define DB_OVERWRITE 0x00001000
|
||||
--- db/dist/s_config.orig 2010-04-12 20:25:23.000000000 +0000
|
||||
+++ db/dist/s_config 2011-05-12 12:00:34.000000000 +0000
|
||||
@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3
|
||||
. ./RELEASE
|
||||
|
||||
echo "autoconf: building aclocal.m4..."
|
||||
-cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4
|
||||
+cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4
|
||||
+aclocal
|
||||
|
||||
echo "autoconf: running autoheader to build config.hin..."
|
||||
rm -f config.hin
|
||||
--- db/mp/mp_sync.c.orig 2010-04-12 20:25:34.000000000 +0000
|
||||
+++ db/mp/mp_sync.c 2011-05-12 11:36:58.000000000 +0000
|
||||
@@ -578,7 +578,7 @@ done: /*
|
||||
if (ret == 0 && required_write) {
|
||||
--- db/mp/mp_sync.c.orig 2004-11-11 15:58:48.000000000 +0000
|
||||
+++ db/mp/mp_sync.c 2005-12-15 16:23:57.000000000 +0000
|
||||
@@ -553,7 +553,7 @@ done: /*
|
||||
if (ret == 0 && (op == DB_SYNC_CACHE || op == DB_SYNC_FILE)) {
|
||||
if (dbmfp == NULL)
|
||||
ret = __memp_sync_files(env);
|
||||
ret = __memp_sync_files(dbenv, dbmp);
|
||||
- else
|
||||
+ else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
|
||||
ret = __os_fsync(env, dbmfp->fhp);
|
||||
+ else if (!dbmfp->mfp || !F_ISSET(dbmfp->mfp, MP_NOFSYNC))
|
||||
ret = __os_fsync(dbenv, dbmfp->fhp);
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp,
|
||||
"%s: unable to flush", (char *)
|
||||
R_ADDR(dbmp->reginfo, mfp->path_off));
|
||||
}
|
||||
- } else
|
||||
+ } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
|
||||
ret = __os_fsync(env, dbmfp->fhp);
|
||||
@@ -600,7 +600,7 @@ int __memp_sync_files(dbenv, dbmp)
|
||||
MUTEX_THREAD_LOCK(dbenv, dbmp->mutexp);
|
||||
for (dbmfp = TAILQ_FIRST(&dbmp->dbmfq);
|
||||
dbmfp != NULL; dbmfp = TAILQ_NEXT(dbmfp, q)) {
|
||||
- if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY))
|
||||
+ if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY | MP_NOFSYNC))
|
||||
continue;
|
||||
ret = __os_fsync(dbenv, dbmfp->fhp);
|
||||
break;
|
||||
@@ -662,6 +662,9 @@ __memp_mf_sync(dbmp, mfp)
|
||||
|
||||
/*
|
||||
@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked)
|
||||
COMPQUIET(hp, NULL);
|
||||
env = dbmp->env;
|
||||
dbenv = dbmp->dbenv;
|
||||
|
||||
+ if (F_ISSET(mfp, MP_NOFSYNC))
|
||||
+ return 0;
|
||||
+
|
||||
/*
|
||||
* We need to be holding the hash lock: we're using the path name
|
||||
* and __memp_nameop might try and rename the file.
|
||||
* Expects caller to be holding the region lock: we're using the path
|
||||
* name and __memp_nameop might try and rename the file.
|
||||
--- db/dist/s_config.orig 2003-12-15 21:42:41.000000000 +0000
|
||||
+++ db/dist/s_config 2005-02-11 14:44:09.018907747 +0000
|
||||
@@ -20,14 +20,15 @@
|
||||
autoconf
|
||||
|
||||
# Edit version information we couldn't pre-compute.
|
||||
-(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" &&
|
||||
- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" &&
|
||||
- echo "w" &&
|
||||
- echo "q") | ed configure
|
||||
+mv configure configure.old
|
||||
+sed -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
|
||||
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
|
||||
+< configure.old > configure
|
||||
+rm -f configure.old
|
||||
|
||||
rm -rf autom4te.cache
|
||||
chmod 555 configure
|
||||
--- db/dist/aclocal/options.ac.orig 2005-12-15 16:43:14.000000000 +0000
|
||||
+++ db/dist/aclocal/options.ac 2005-12-15 16:43:40.000000000 +0000
|
||||
@@ -277,10 +277,6 @@ fi
|
||||
|
||||
# Uniquename excludes C++, Java, RPC.
|
||||
if test "$db_cv_uniquename" = "yes"; then
|
||||
- if test "$db_cv_rpc" = "yes"; then
|
||||
- AC_MSG_ERROR(
|
||||
- [--with-uniquename is not compatible with --enable-rpc])
|
||||
- fi
|
||||
if test "$db_cv_cxx" = "yes"; then
|
||||
AC_MSG_ERROR(
|
||||
[--with-uniquename is not compatible with --enable-cxx])
|
||||
|
Reference in New Issue
Block a user