[vdsm/f17] update to vdsm-4.10.0-9

Federico Simoncelli fsimonce at fedoraproject.org
Mon Sep 24 21:30:19 UTC 2012


commit 6368f7b6f026f937e3e84b3ebbc4af763b122589
Author: Federico Simoncelli <fsimonce at redhat.com>
Date:   Mon Sep 24 23:28:51 2012 +0200

    update to vdsm-4.10.0-9
    
    - BZ#845660 Use the recommended alignment instead of using pagesize
    
    Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>

 ...ommended-alignment-instead-of-using-pages.patch |   59 ++++++++++++++++++++
 vdsm.spec                                          |    7 ++-
 2 files changed, 65 insertions(+), 1 deletions(-)
---
diff --git a/0043-Use-the-recommended-alignment-instead-of-using-pages.patch b/0043-Use-the-recommended-alignment-instead-of-using-pages.patch
new file mode 100644
index 0000000..d62de9d
--- /dev/null
+++ b/0043-Use-the-recommended-alignment-instead-of-using-pages.patch
@@ -0,0 +1,59 @@
+From b4f0985266f5fba817602e8af9ad900425c5a853 Mon Sep 17 00:00:00 2001
+From: Saggi Mizrahi <smizrahi at redhat.com>
+Date: Mon, 24 Sep 2012 01:28:38 +0200
+Subject: [PATCH] Use the recommended alignment instead of using pagesize
+
+Page size is the usual recommended alignment but when it isn't using it
+can cause memory corruption.
+
+Change-Id: If9da41a2f74d3cea7300df9606c78eebcc9927a9
+Signed-off-by: Saggi Mizrahi <smizrahi at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/8143
+Tested-by: Noam Slomianko <nslomian at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/8174
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+Tested-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ vdsm/storage/fileUtils.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py
+index 020f16d..511dff9 100644
+--- a/vdsm/storage/fileUtils.py
++++ b/vdsm/storage/fileUtils.py
+@@ -45,9 +45,10 @@ NFS_OPTIONS = "".join(config.get('irs', 'nfs_mount_options').split())
+ 
+ log = logging.getLogger('fileUtils')
+ 
+-PAGESIZE = libc.getpagesize()
+ CharPointer = ctypes.POINTER(ctypes.c_char)
+ 
++_PC_REC_XFER_ALIGN = 17
++
+ class TarCopyFailed(RuntimeError): pass
+ 
+ def tarCopy(src, dst, exclude=[]):
+@@ -71,7 +72,8 @@ def isStaleHandle(path):
+         os.listdir(path)
+     except OSError as ex:
+         if ex.errno in (errno.EIO, errno.ESTALE):
+-            return  True
++            return True
++
+         # We could get contradictory results because of
+         # soft mounts
+         if (exists or st) and ex.errno == errno.ENOENT:
+@@ -262,7 +264,8 @@ class DirectFile(object):
+         ppbuff = ctypes.pointer(pbuff)
+         # Because we usually have fixed sizes for our reads, caching
+         # buffers might give a slight performance boost.
+-        rc = libc.posix_memalign(ppbuff, PAGESIZE, size)
++        alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN)
++        rc = libc.posix_memalign(ppbuff, alignment, size)
+         if rc:
+             raise OSError(rc, "Could not allocate aligned buffer")
+         try:
+-- 
+1.7.11.4
+
diff --git a/vdsm.spec b/vdsm.spec
index 60ec9a5..b9c02ec 100644
--- a/vdsm.spec
+++ b/vdsm.spec
@@ -28,7 +28,7 @@
 
 Name:           %{vdsm_name}
 Version:        4.10.0
-Release:        8%{?vdsm_relvtag}%{?dist}%{?extra_release}
+Release:        9%{?vdsm_relvtag}%{?dist}%{?extra_release}
 Summary:        Virtual Desktop Server Manager
 
 Group:          Applications/System
@@ -85,6 +85,7 @@ Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch
 Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch
 Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch
 Patch41: 0042-Ship-the-version-file-with-the-tarballs.patch
+Patch42: 0043-Use-the-recommended-alignment-instead-of-using-pages.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -429,6 +430,7 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
 %patch40 -p1 -b .patch40
 %patch41 -p1 -b .patch41
 %{__chmod} +x build-aux/pkg-version  # required by patch41
+%patch42 -p1 -b .patch42
 
 %build
 %if 0%{?enable_autotools}
@@ -992,6 +994,9 @@ exit 0
 %{_datadir}/%{vdsm_name}/gluster/hostname.py*
 
 %changelog
+* Mon Sep 24 2012 Federico Simoncelli <fsimonce at redhat.com> 4.10.0-9.fc17
+- BZ#845660 Use the recommended alignment instead of using pagesize
+
 * Tue Sep 11 2012 Federico Simoncelli <fsimonce at redhat.com> 4.10.0-8.fc17
 - add the autotools support
 


More information about the scm-commits mailing list