From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFLIR-0003AV-03 for qemu-devel@nongnu.org; Fri, 30 Aug 2013 05:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFLIK-0002Oh-5L for qemu-devel@nongnu.org; Fri, 30 Aug 2013 05:47:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFLIJ-0002OV-Tb for qemu-devel@nongnu.org; Fri, 30 Aug 2013 05:47:08 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7U9l645001308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Aug 2013 05:47:06 -0400 Date: Fri, 30 Aug 2013 11:47:05 +0200 From: Kevin Wolf Message-ID: <20130830094705.GC2840@dhcp-200-207.str.redhat.com> References: <1377852015-14762-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377852015-14762-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 0/2] qcow2: Snapshot update for zero clusters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Am 30.08.2013 um 10:40 hat Max Reitz geschrieben: > When creating a snapshots, the refcount adjustment function basically > adjusted the refcounts of any cluster with a non-zero L2 entry. However, > the L2 entry of unallocated zero clusters is exactly one (therefore > non-zero) which led to wrong refcount updates on cluster 0 (the main > qcow2 header), since the cluster index for these unallocated zero clusters > is 0. > > This series fixes this by taking all cluster types specifically into > account using qcow2_get_cluster_type and handling them accordingly. > Furthermore, a short test is added. > > v3: > - forgot 062.out in v2; now added > > v2: > - more thorough commit message > - take pre-allocated zero clusters into account > - abort on unknown cluster type > - a test case > > Max Reitz (2): > qcow2-refcount: Snapshot update for zero clusters > qemu-iotests: Snapshotting zero clusters > > block/qcow2-refcount.c | 52 +++++++++++++++++++++++++------------ > tests/qemu-iotests/062 | 64 ++++++++++++++++++++++++++++++++++++++++++++++ > tests/qemu-iotests/062.out | 9 +++++++ > tests/qemu-iotests/group | 1 + > 4 files changed, 109 insertions(+), 17 deletions(-) > create mode 100755 tests/qemu-iotests/062 > create mode 100644 tests/qemu-iotests/062.out Thanks, applied to the block branch. Kevin