[fedora-virt-maint] rpms/qemu/devel qemu-fix-qcow2-corruption.patch, NONE, 1.1 qemu.spec, 1.80, 1.81
Mark McLoughlin
markmc at fedoraproject.org
Mon Apr 20 13:52:06 UTC 2009
Author: markmc
Update of /cvs/pkgs/rpms/qemu/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32597
Modified Files:
qemu.spec
Added Files:
qemu-fix-qcow2-corruption.patch
Log Message:
* Mon Apr 20 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10-11
- Fix qcow2 image corruption (#496642)
qemu-fix-qcow2-corruption.patch:
--- NEW FILE qemu-fix-qcow2-corruption.patch ---
From: Kevin Wolf <kwolf at redhat.com>
To: qemu-devel at nongnu.org
Subject: [Qemu-devel] [PATCH] qcow2 corruption: Fix alloc_cluster_link_l2
This patch fixes a qcow2 corruption bug introduced in SVN Rev 5861. L2 tables
are big endian, so entries must be converted before being passed to functions.
This bug is easy to trigger. The following script will create and destroy a
qcow2 image (the header is gone after three loop iterations):
#!/bin/bash
qemu-img create -f qcow2 test.qcow 1M
for i in $(seq 1 10); do
qemu-system-x86_64 -hda test.qcow -monitor stdio > /dev/null 2>&1 <<EOF
savevm test-$i
quit
EOF
done
Signed-off-by: Kevin Wolf <kwolf at redhat.com>
---
block-qcow2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff -up qemu-kvm-0.10/qemu/block-qcow2.c.qcow2-corruption qemu-kvm-0.10/qemu/block-qcow2.c
--- qemu-kvm-0.10/qemu/block-qcow2.c.qcow2-corruption 2009-04-20 14:41:22.000000000 +0100
+++ qemu-kvm-0.10/qemu/block-qcow2.c 2009-04-20 14:41:54.000000000 +0100
@@ -912,7 +912,7 @@ static int alloc_cluster_link_l2(BlockDr
goto err;
for (i = 0; i < j; i++)
- free_any_clusters(bs, old_cluster[i], 1);
+ free_any_clusters(bs, be64_to_cpu(old_cluster[i]), 1);
ret = 0;
err:
Index: qemu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qemu/devel/qemu.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- qemu.spec 19 Apr 2009 15:34:37 -0000 1.80
+++ qemu.spec 20 Apr 2009 13:51:35 -0000 1.81
@@ -1,7 +1,7 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 0.10
-Release: 10%{?dist}
+Release: 11%{?dist}
# I have mistakenly thought the revision name would be 1.0.
# So 0.10 series get Epoch = 1
Epoch: 2
@@ -38,6 +38,7 @@
Patch14: qemu-bios-bigger-roms.patch
Patch15: qemu-fix-display-breakage.patch
Patch16: qemu-fix-qcow2-2TB.patch
+Patch17: qemu-fix-qcow2-corruption.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
@@ -224,6 +225,7 @@
%patch14 -p1
%patch15 -p1
%patch16 -p1
+%patch17 -p1
%build
# systems like rhel build system does not have a recent enough linker so
@@ -465,6 +467,9 @@
%{_mandir}/man1/qemu-img.1*
%changelog
+* Mon Apr 20 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10-11
+- Fix qcow2 image corruption (#496642)
+
* Sun Apr 19 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10-10
- Run sysconfig.modules from %post on x86_64 too (#494739)
More information about the Fedora-virt-maint
mailing list