[pkg-db-commits] [db5.3] 01/03: Add fix for ppc 64K pages needed for OpenLDAP (Courtesy of Cedric Le Goater)

Ondrej Sury ondrej at moszumanska.debian.org
Thu May 15 11:34:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

ondrej pushed a commit to branch debian-sid
in repository db5.3.

commit a5168b885f6f5d45c991cd18a1d285fd73880a96
Author: Ondřej Surý <ondrej at sury.org>
Date:   Tue Mar 18 11:18:02 2014 +0100

    Add fix for ppc 64K pages needed for OpenLDAP (Courtesy of Cedric Le Goater)
---
 ...extend-mode-requires-page-aligned-extends.patch | 34 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 35 insertions(+)

diff --git a/debian/patches/mmap_extend-mode-requires-page-aligned-extends.patch b/debian/patches/mmap_extend-mode-requires-page-aligned-extends.patch
new file mode 100644
index 0000000..4082103
--- /dev/null
+++ b/debian/patches/mmap_extend-mode-requires-page-aligned-extends.patch
@@ -0,0 +1,34 @@
+From: Andy Whitcroft <apw at canonical.com>
+Subject: [PATCH] MMAP_EXTEND mode requires we extend in full system page increments
+Date: Wed, 12 Mar 2014 11:58:31 +0100
+
+When extending a mmap file we must ensure we extend by full system pages,
+otherwise there is a risk (when the filesystem page size is smaller than
+the system page size) that we will not allocate disk extents to store
+the memory and it will be lost resulting in data loss.
+
+Signed-off-by: Andy Whitcroft <apw at canonical.com>
+Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
+
+---
+ env_file.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- db5.3.orig/src/env/env_file.c
++++ db5.3/src/env/env_file.c
+@@ -28,6 +28,15 @@ __db_file_extend(env, fhp, size)
+ 	int ret;
+ 	char buf;
+ 
++#ifdef HAVE_MMAP_EXTEND
++	/*
++	 * We have to ensure we extend a mmap'd segment a full memory page at
++	 * a time or risk the end of the page not having any filesystem blocks
++	 * associated resulting in the data loss.
++	 */
++	size = DB_ALIGN(size, getpagesize()) - 1;
++#endif
++
+ 	buf = '\0';
+ 	/*
+ 	 * Extend the file by writing the last page.  If the region is >4Gb,
diff --git a/debian/patches/series b/debian/patches/series
index 2204c13..e5be750 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 005-pg_crypt_size.patch
 006-mutex_alignment.patch
 007-link-sql-libs.patch
+mmap_extend-mode-requires-page-aligned-extends.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-db/db5.3.git



More information about the pkg-db-commits mailing list