From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgyPC-0005WK-Fr for qemu-devel@nongnu.org; Wed, 22 Oct 2014 12:05:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgyP7-0007c9-9E for qemu-devel@nongnu.org; Wed, 22 Oct 2014 12:04:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgyP7-0007bq-1X for qemu-devel@nongnu.org; Wed, 22 Oct 2014 12:04:53 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9MG4peo020558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 22 Oct 2014 12:04:51 -0400 Message-ID: <5447D5A2.2090607@redhat.com> Date: Wed, 22 Oct 2014 10:04:50 -0600 From: Eric Blake MIME-Version: 1.0 References: <1413982283-10186-1-git-send-email-mreitz@redhat.com> <1413982283-10186-4-git-send-email-mreitz@redhat.com> In-Reply-To: <1413982283-10186-4-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="erUWSA387FRokJrfobCldqL86XoKiDj41" Subject: Re: [Qemu-devel] [PATCH v13 03/14] qcow2: Optimize bdrv_make_empty() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --erUWSA387FRokJrfobCldqL86XoKiDj41 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/22/2014 06:51 AM, Max Reitz wrote: > bdrv_make_empty() is currently only called if the current image > represents an external snapshot that has been committed to its base > image; it is therefore unlikely to have internal snapshots. In this > case, bdrv_make_empty() can be greatly sped up by emptying the L1 and > refcount table (while having the dirty flag set, which only works for > compat=3D1.1) and creating a trivial refcount structure. >=20 > If there are snapshots or for compat=3D0.10, fall back to the simple > implementation (discard all clusters). >=20 > Signed-off-by: Max Reitz > --- > block/blkdebug.c | 2 + > block/qcow2.c | 143 ++++++++++++++++++++++++++++++++++++++++++= ++------ > include/block/block.h | 2 + > 3 files changed, 132 insertions(+), 15 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --erUWSA387FRokJrfobCldqL86XoKiDj41 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUR9WiAAoJEKeha0olJ0Nq7IgH+gNauDDYJouCw8faXLkVKzN0 6DLjkMQYiEyLgPGsSBwK4NUNUKrxEpjzIAWYrN0hF5TLIgtUAcSUJl+JyYdP1pQb xZ4Aff2OGjqBxgHVPVrBt7DZJud2BnOc7Z+MzlF2dcRBlooBoK5oYz17xavH1wj1 3Hdm8M+rfNPCJ3yTY/+tEiatRXxfIJ0Ni3zr+5mm/N5xK/OVPxa9Vm/Z+2Pbds08 PPIzc445SFZMEYxroe3Vt6w9AMMC/8PLJNQRXXgOXoI642wTxuti9BBKo9LBh5qY V5+JoJnHR8bWmV71MauShaGCseY3O9qbSY7zzDqRtHrFZp7cqAlxkR53URtjJZM= =boi7 -----END PGP SIGNATURE----- --erUWSA387FRokJrfobCldqL86XoKiDj41--