From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOm0K-0002Yv-Rn for qemu-devel@nongnu.org; Wed, 25 Sep 2013 06:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOm0E-0005UF-TD for qemu-devel@nongnu.org; Wed, 25 Sep 2013 06:07:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOm0E-0005U9-LF for qemu-devel@nongnu.org; Wed, 25 Sep 2013 06:07:26 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8PA7QnH005844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Sep 2013 06:07:26 -0400 From: Max Reitz Date: Wed, 25 Sep 2013 12:07:21 +0200 Message-Id: <1380103643-30419-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] Correct bitmap size in zero cluster expansion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz The current version of the zero cluster expansion uses the guest disk size for determining the size of the expanded_clusters bitmap, however, it is addressed using host offsets. This leads to an assertion failing if the host image size exceeds the guest disk size. This is fixed by using the host image size instead for allocating the bitmap. This however uncovers another problem: If the host image is growable, it may grow during the zero cluster expansion due to cluster allocations. If this happens, the bitmap has to be resized accordingly. Max Reitz (2): qcow2: Correct bitmap size in zero expansion qemu-iotests: Preallocated zero clusters in 061 block/qcow2-cluster.c | 38 +++++++++++++++++++++++++++----------- tests/qemu-iotests/061 | 9 +++++++++ tests/qemu-iotests/061.out | 11 +++++++++++ 3 files changed, 47 insertions(+), 11 deletions(-) -- 1.8.3.1