diff -u qemu-kvm-1.0+noroms/debian/changelog qemu-kvm-1.0+noroms/debian/changelog --- qemu-kvm-1.0+noroms/debian/changelog +++ qemu-kvm-1.0+noroms/debian/changelog @@ -1,3 +1,10 @@ +qemu-kvm (1.0+noroms-0ubuntu14.9) precise-proposed; urgency=low + + * 9004-qcow2-start-at-0-when-counting-cow-clusters.patch: Fixes corruption + issues with qcow2. (LP: #1189926) + + -- Chris J Arges Wed, 12 Jun 2013 13:19:46 -0500 + qemu-kvm (1.0+noroms-0ubuntu14.8) precise-proposed; urgency=low * qemu-utils.links: fix kvm-nbd.8.gz and kvm-img.1.gz symlinks. (LP: #1089402) diff -u qemu-kvm-1.0+noroms/debian/patches/series qemu-kvm-1.0+noroms/debian/patches/series --- qemu-kvm-1.0+noroms/debian/patches/series +++ qemu-kvm-1.0+noroms/debian/patches/series @@ -32,0 +33 @@ +9004-qcow2-start-at-0-when-counting-cow-clusters.patch only in patch2: unchanged: --- qemu-kvm-1.0+noroms.orig/debian/patches/9004-qcow2-start-at-0-when-counting-cow-clusters.patch +++ qemu-kvm-1.0+noroms/debian/patches/9004-qcow2-start-at-0-when-counting-cow-clusters.patch @@ -0,0 +1,35 @@ +From b076a5de8014334fc7e592dae2a1d2d16479ef90 Mon Sep 17 00:00:00 2001 +From: Chris J Arges +Date: Fri, 14 Jun 2013 16:17:46 -0500 +Subject: [PATCH] qcow2: start at 0 when counting cow clusters + +BugLink: http://bugs.launchpad.net/bugs/1189926 + +This patch fixes corruption issues. +While searching for available clusters, if we detect an ongoing AIO +write request, then we restart after the other has completed. By not +re-setting i to 0, we fail to re-check clusters which may no longer be +available. + +Signed-off-by: Chris J Arges +--- + block/qcow2-cluster.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c +index f4e049f..ed3c14e 100644 +--- a/block/qcow2-cluster.c ++++ b/block/qcow2-cluster.c +@@ -748,7 +748,7 @@ again: + nb_clusters = 1; + + /* how many available clusters ? */ +- ++ i = 0; + while (i < nb_clusters) { + i += count_contiguous_clusters(nb_clusters - i, s->cluster_size, + &l2_table[l2_index], i, 0); +-- +1.7.9.5 +