[qemu/f21] Backport upstream patch fixing some qemu-img conversion errors (RHBZ#1200043)
Haïkel Guémar
hguemar at fedoraproject.org
Tue Mar 10 08:55:47 UTC 2015
commit 3061681f047e2eed3855eefd7c2aa7261205d5cf
Author: Haikel Guemar <hguemar at fedoraproject.org>
Date: Tue Mar 10 09:55:13 2015 +0100
Backport upstream patch fixing some qemu-img conversion errors (RHBZ#1200043)
...ow-kernel-option-to-take-a-gzip-compresse.patch | 6 +++-
0003-block.curl-adding-timeout-option.patch | 6 +++-
...a-cookie-or-cookies-to-be-sent-with-http-.patch | 8 +++--
...-t-deref-NULL-pointer-in-call-to-aio_poll.patch | 6 +++-
...rtio-pci-fix-migration-for-pci-bus-master.patch | 6 +++-
...rtio-pci-fix-migration-for-pci-bus-master.patch | 6 +++-
...w-posix-Fix-disk-corruption-in-try_fiemap.patch | 6 +++-
...k-raw-posix-use-seek_hole-ahead-of-fiemap.patch | 6 +++-
...-usb-host-fix-usb_host_speed_compat-tyops.patch | 6 +++-
...lock-Fix-max-nb_sectors-in-bdrv_make_zero.patch | 34 ++++++++++++++++++++++
qemu.spec | 9 +++++-
11 files changed, 88 insertions(+), 11 deletions(-)
---
diff --git a/0002-aarch64-Allow-kernel-option-to-take-a-gzip-compresse.patch b/0002-aarch64-Allow-kernel-option-to-take-a-gzip-compresse.patch
index 4dfed3f..637fa3c 100644
--- a/0002-aarch64-Allow-kernel-option-to-take-a-gzip-compresse.patch
+++ b/0002-aarch64-Allow-kernel-option-to-take-a-gzip-compresse.patch
@@ -1,6 +1,7 @@
+From e96a3d72b1f869ee3bf0bdbb4a3ca8f9ae4de144 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 19 Aug 2014 18:56:28 +0100
-Subject: [PATCH] aarch64: Allow -kernel option to take a gzip-compressed
+Subject: [PATCH 02/11] aarch64: Allow -kernel option to take a gzip-compressed
kernel.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -51,3 +52,6 @@ index 50b6c5c..4bad4e6 100644
if (kernel_size < 0) {
entry = info->loader_start + kernel_load_offset;
kernel_size = load_image_targphys(info->kernel_filename, entry,
+--
+2.1.0
+
diff --git a/0003-block.curl-adding-timeout-option.patch b/0003-block.curl-adding-timeout-option.patch
index b003edf..d05e3d2 100644
--- a/0003-block.curl-adding-timeout-option.patch
+++ b/0003-block.curl-adding-timeout-option.patch
@@ -1,6 +1,7 @@
+From 799d9c41ae5fd105e1467863dd912f8fd4e970bf Mon Sep 17 00:00:00 2001
From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
Date: Wed, 13 Aug 2014 12:44:27 -0300
-Subject: [PATCH] block.curl: adding 'timeout' option
+Subject: [PATCH 03/11] block.curl: adding 'timeout' option
The curl hardcoded timeout (5 seconds) sometimes is not long
enough depending on the remote server configuration and network
@@ -110,3 +111,6 @@ index 1549625..dcb008b 100644
qemu-system-x86_64 -drive file=/tmp/test.qcow2
@end example
+--
+2.1.0
+
diff --git a/0004-curl-Allow-a-cookie-or-cookies-to-be-sent-with-http-.patch b/0004-curl-Allow-a-cookie-or-cookies-to-be-sent-with-http-.patch
index e58b6e4..7a4d76a 100644
--- a/0004-curl-Allow-a-cookie-or-cookies-to-be-sent-with-http-.patch
+++ b/0004-curl-Allow-a-cookie-or-cookies-to-be-sent-with-http-.patch
@@ -1,7 +1,8 @@
+From db1048a84b2cbf57809a5fcaebd567e8e9a209e4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 29 Aug 2014 16:03:12 +0100
-Subject: [PATCH] curl: Allow a cookie or cookies to be sent with http/https
- requests.
+Subject: [PATCH 04/11] curl: Allow a cookie or cookies to be sent with
+ http/https requests.
In order to access VMware ESX efficiently, we need to send a session
cookie. This patch is very simple and just allows you to send that
@@ -121,3 +122,6 @@ index dcb008b..53b6171 100644
@item timeout
Set the timeout in seconds of the CURL connection. This timeout is the time
that CURL waits for a response from the remote server to get the size of the
+--
+2.1.0
+
diff --git a/0005-curl-Don-t-deref-NULL-pointer-in-call-to-aio_poll.patch b/0005-curl-Don-t-deref-NULL-pointer-in-call-to-aio_poll.patch
index b00a751..dd0a1e0 100644
--- a/0005-curl-Don-t-deref-NULL-pointer-in-call-to-aio_poll.patch
+++ b/0005-curl-Don-t-deref-NULL-pointer-in-call-to-aio_poll.patch
@@ -1,6 +1,7 @@
+From 61fa004b207d01de98cd2aac6fe7b553da6fe079 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 28 Aug 2014 09:04:21 +0100
-Subject: [PATCH] curl: Don't deref NULL pointer in call to aio_poll.
+Subject: [PATCH 05/11] curl: Don't deref NULL pointer in call to aio_poll.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -74,3 +75,6 @@ index 537e257..d28b701 100644
if (!state) {
acb->common.cb(acb->common.opaque, -EIO);
qemu_aio_release(acb);
+--
+2.1.0
+
diff --git a/0006-virtio-pci-fix-migration-for-pci-bus-master.patch b/0006-virtio-pci-fix-migration-for-pci-bus-master.patch
index 98b050f..38b7fb0 100644
--- a/0006-virtio-pci-fix-migration-for-pci-bus-master.patch
+++ b/0006-virtio-pci-fix-migration-for-pci-bus-master.patch
@@ -1,6 +1,7 @@
+From 5c8a5868a03d062a25a0345dc8c97358fd7ad6f9 Mon Sep 17 00:00:00 2001
From: "Michael S. Tsirkin" <mst at redhat.com>
Date: Thu, 11 Sep 2014 18:34:29 +0300
-Subject: [PATCH] virtio-pci: fix migration for pci bus master
+Subject: [PATCH 06/11] virtio-pci: fix migration for pci bus master
Current support for bus master (clearing OK bit)
together with the need to support guests which do not
@@ -114,3 +115,6 @@ index ba675fe..ec582fe 100644
}
static Property virtio_pci_properties[] = {
+--
+2.1.0
+
diff --git a/0007-Revert-virtio-pci-fix-migration-for-pci-bus-master.patch b/0007-Revert-virtio-pci-fix-migration-for-pci-bus-master.patch
index 1993a96..0227afa 100644
--- a/0007-Revert-virtio-pci-fix-migration-for-pci-bus-master.patch
+++ b/0007-Revert-virtio-pci-fix-migration-for-pci-bus-master.patch
@@ -1,6 +1,7 @@
+From ff681d852d37fe9f1ac64076fc18ecc1b9b698da Mon Sep 17 00:00:00 2001
From: "Michael S. Tsirkin" <mst at redhat.com>
Date: Mon, 29 Sep 2014 11:27:32 +0300
-Subject: [PATCH] Revert "virtio-pci: fix migration for pci bus master"
+Subject: [PATCH 07/11] Revert "virtio-pci: fix migration for pci bus master"
This reverts commit 4d43d3f3c8147ade184df9a1e9e82826edd39e19.
@@ -95,3 +96,6 @@ index ec582fe..ba675fe 100644
}
static Property virtio_pci_properties[] = {
+--
+2.1.0
+
diff --git a/0008-block-raw-posix-Fix-disk-corruption-in-try_fiemap.patch b/0008-block-raw-posix-Fix-disk-corruption-in-try_fiemap.patch
index 49e4de3..14bb69e 100644
--- a/0008-block-raw-posix-Fix-disk-corruption-in-try_fiemap.patch
+++ b/0008-block-raw-posix-Fix-disk-corruption-in-try_fiemap.patch
@@ -1,6 +1,7 @@
+From af316039d3f1818463e8d5f8f4e5eaf19a2c7b55 Mon Sep 17 00:00:00 2001
From: Tony Breeds <tony at bakeyournoodle.com>
Date: Fri, 26 Sep 2014 09:14:11 +1000
-Subject: [PATCH] block/raw-posix: Fix disk corruption in try_fiemap
+Subject: [PATCH 08/11] block/raw-posix: Fix disk corruption in try_fiemap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -39,3 +40,6 @@ index efa5686..8f6c923 100644
f.fm.fm_extent_count = 1;
f.fm.fm_reserved = 0;
if (ioctl(s->fd, FS_IOC_FIEMAP, &f) == -1) {
+--
+2.1.0
+
diff --git a/0009-block-raw-posix-use-seek_hole-ahead-of-fiemap.patch b/0009-block-raw-posix-use-seek_hole-ahead-of-fiemap.patch
index b8be43f..57664a7 100644
--- a/0009-block-raw-posix-use-seek_hole-ahead-of-fiemap.patch
+++ b/0009-block-raw-posix-use-seek_hole-ahead-of-fiemap.patch
@@ -1,6 +1,7 @@
+From 1b66fe241d9609fed79ee1583e6425833a1d7d9e Mon Sep 17 00:00:00 2001
From: Tony Breeds <tony at bakeyournoodle.com>
Date: Fri, 26 Sep 2014 09:14:12 +1000
-Subject: [PATCH] block/raw-posix: use seek_hole ahead of fiemap
+Subject: [PATCH 09/11] block/raw-posix: use seek_hole ahead of fiemap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -44,3 +45,6 @@ index 8f6c923..50d29e7 100644
if (ret < 0) {
/* Assume everything is allocated. */
data = 0;
+--
+2.1.0
+
diff --git a/0010-usb-host-fix-usb_host_speed_compat-tyops.patch b/0010-usb-host-fix-usb_host_speed_compat-tyops.patch
index 37ea3d3..801306b 100644
--- a/0010-usb-host-fix-usb_host_speed_compat-tyops.patch
+++ b/0010-usb-host-fix-usb_host_speed_compat-tyops.patch
@@ -1,6 +1,7 @@
+From 05c1cce68ef4eea1337f5d415f3b98a2f2283931 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel at redhat.com>
Date: Mon, 10 Nov 2014 12:14:22 +0100
-Subject: [PATCH] usb-host: fix usb_host_speed_compat tyops
+Subject: [PATCH 10/11] usb-host: fix usb_host_speed_compat tyops
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Reviewed-by: Gonglei <arei.gonglei at huawei.com>
@@ -30,3 +31,6 @@ index c189147..69213e9 100644
}
}
+--
+2.1.0
+
diff --git a/0011-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch b/0011-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch
new file mode 100644
index 0000000..3eedd00
--- /dev/null
+++ b/0011-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch
@@ -0,0 +1,34 @@
+From a7cb55181edfc1e328027916e54d873c7eb85421 Mon Sep 17 00:00:00 2001
+From: Fam Zheng <famz at redhat.com>
+Date: Mon, 10 Nov 2014 15:07:44 +0800
+Subject: [PATCH 11/11] block: Fix max nb_sectors in bdrv_make_zero
+
+In bdrv_rw_co we report -EINVAL for nb_sectors > INT_MAX /
+BDRV_SECTOR_SIZE, so a caller shouldn't exceed it.
+
+Signed-off-by: Fam Zheng <famz at redhat.com>
+Reviewed-by: Markus Armbruster <armbru at redhat.com>
+Message-id: 1415603264-21497-1-git-send-email-famz at redhat.com
+Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
+---
+ block.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/block.c b/block.c
+index ed87b7e..8dc841c 100644
+--- a/block.c
++++ b/block.c
+@@ -2834,8 +2834,8 @@ int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags)
+ if (nb_sectors <= 0) {
+ return 0;
+ }
+- if (nb_sectors > INT_MAX) {
+- nb_sectors = INT_MAX;
++ if (nb_sectors > INT_MAX / BDRV_SECTOR_SIZE) {
++ nb_sectors = INT_MAX / BDRV_SECTOR_SIZE;
+ }
+ ret = bdrv_get_block_status(bs, sector_num, nb_sectors, &n);
+ if (ret < 0) {
+--
+2.1.0
+
diff --git a/qemu.spec b/qemu.spec
index 6b44760..cdd30d5 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -152,7 +152,7 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 2.1.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
Group: Development/Tools
@@ -207,6 +207,8 @@ Patch0008: 0008-block-raw-posix-Fix-disk-corruption-in-try_fiemap.patch
Patch0009: 0009-block-raw-posix-use-seek_hole-ahead-of-fiemap.patch
# Fix USB host assignment (bz #1187749)
Patch0010: 0010-usb-host-fix-usb_host_speed_compat-tyops.patch
+# Fix qemu-img error (bz #1200043)
+Patch0011: 0011-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch
BuildRequires: SDL2-devel
BuildRequires: zlib-devel
@@ -748,6 +750,8 @@ CAC emulation development files.
%patch0009 -p1
# Fix USB host assignment (bz #1187749)
%patch0010 -p1
+# Fix qemu-img error (bz #1200043)
+%patch0011 -p1
%build
@@ -1528,6 +1532,9 @@ getent passwd qemu >/dev/null || \
%endif
%changelog
+* Tue Mar 10 2015 Haïkel Guémar <hguemar at fedoraproject.org> - 2:2.1.3-3
+- Backport upstream patch fixing some qemu-img conversion errors (RHBZ#1200043)
+
* Sat Feb 07 2015 Cole Robinson <crobinso at redhat.com> - 2:2.1.3-2
- Fix USB host assignment (bz #1187749)
More information about the scm-commits
mailing list