Hello community,

here is the log from the commit of package libvirt for openSUSE:Factory checked 
in at 2015-08-27 08:57:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libvirt (Old)
 and      /work/SRC/openSUSE:Factory/.libvirt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libvirt"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libvirt/libvirt.changes  2015-08-12 
15:12:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libvirt.new/libvirt.changes     2015-08-27 
08:57:23.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Aug 24 16:18:10 UTC 2015 - [email protected]
+
+- storage: only run safezero if allocation is > 0
+  269d39af-storage-allocation-fix.patch
+  bsc#942085
+
+-------------------------------------------------------------------

New:
----
  269d39af-storage-allocation-fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libvirt.spec ++++++
--- /var/tmp/diff_new_pack.ul0KTF/_old  2015-08-27 08:57:25.000000000 +0200
+++ /var/tmp/diff_new_pack.ul0KTF/_new  2015-08-27 08:57:25.000000000 +0200
@@ -446,6 +446,7 @@
 Source4:        libvirtd-relocation-server.fw
 Source99:       baselibs.conf
 # Upstream patches
+Patch0:         269d39af-storage-allocation-fix.patch
 # Patches pending upstream review
 Patch100:       0003-libxl-fix-ref-counting-of-libxlMigrationDstArgs.patch
 Patch101:       0004-libxl-don-t-attempt-to-resume-domain-when-suspend-fa.patch
@@ -979,6 +980,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 %patch100 -p1
 %patch101 -p1
 %patch102 -p1

++++++ 269d39af-storage-allocation-fix.patch ++++++
commit 269d39afe5c59ecb3d3d64dba52f8cfa8d63d197
Author: Guido Günther <[email protected]>
Date:   Sun Aug 23 22:03:54 2015 +0200

    storage: only run safezero if allocation is > 0
    
    While a zero allocation in safezero should be fine it isn't when we use
    posix_fallocate which returns EINVAL on a zero allocation.
    
    While we could skip the zero allocation in safezero_posix_fallocate it's
    an optimization to do it for all allocations.
    
    This fixes vm installation via virtinst for me which otherwise aborts
    like:
    
       Starting install...
       Retrieving file linux...               | 5.9 MB     00:01 ...
       Retrieving file initrd.gz...           |  29 MB     00:07 ...
       ERROR    Couldn't create storage volume 'virtinst-linux.sBgds4': 'cannot 
fill file '/var/lib/libvirt/boot/virtinst-linux.sBgds4': Invalid argument'
    
    The error was introduced by e30297b0 as spotted by Chunyan Liu

Index: libvirt-1.2.18/src/storage/storage_backend.c
===================================================================
--- libvirt-1.2.18.orig/src/storage/storage_backend.c
+++ libvirt-1.2.18/src/storage/storage_backend.c
@@ -455,7 +455,7 @@ createRawFile(int fd, virStorageVolDefPt
         pos = inputvol->target.capacity - remain;
     }
 
-    if (need_alloc) {
+    if (need_alloc && (vol->target.allocation - pos > 0)) {
         if (safezero(fd, pos, vol->target.allocation - pos) < 0) {
             ret = -errno;
             virReportSystemError(errno, _("cannot fill file '%s'"),


Reply via email to