From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjblC-0002pA-OA for qemu-devel@nongnu.org; Fri, 14 Dec 2012 15:21:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjblB-0007Bk-9b for qemu-devel@nongnu.org; Fri, 14 Dec 2012 15:21:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjblB-0007Bb-1U for qemu-devel@nongnu.org; Fri, 14 Dec 2012 15:21:29 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBEKLSLO021879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Dec 2012 15:21:28 -0500 Message-ID: <50CB8A46.8080302@redhat.com> Date: Fri, 14 Dec 2012 13:21:26 -0700 From: Eric Blake MIME-Version: 1.0 References: <1355319999-30627-1-git-send-email-pbonzini@redhat.com> <1355319999-30627-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1355319999-30627-6-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1EE3C9E1CAA93D7BD0360970" Subject: Re: [Qemu-devel] [PATCH 05/20] mirror: perform COW if the cluster size is bigger than the granularity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1EE3C9E1CAA93D7BD0360970 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > When mirroring runs, the backing files for the target may not yet be > ready. However, this means that a copy-on-write operation on the targe= t > would fill the missing sectors with zeros. Copy-on-write only happens > if the granularity of the dirty bitmap is smaller than the cluster size= > (and only for clusters that are allocated in the source after the job > has started copying). So far, the granularity was fixed to 1MB; to avo= id > the problem we detected the situation and required the backing files to= > be available in that case only. >=20 > However, we want to lower the granularity for efficiency, so we need > a better solution. The solution is to always copy a whole cluster the > first time it is touched. The code keeps a bitmap of clusters that > have already been allocated by the mirroring job, and only does "manual= " > copy-on-write if the chunk being copied is zero in the bitmap. >=20 > Signed-off-by: Paolo Bonzini > --- > block/mirror.c | 60 ++++++++++++++++++++++++++++++++++++++= +------- > blockdev.c | 15 +++--------- > tests/qemu-iotests/041 | 21 ++++++++++++++++ > tests/qemu-iotests/041.out | 4 ++-- > trace-events | 1 + > 5 files changed, 78 insertions(+), 23 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig1EE3C9E1CAA93D7BD0360970 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQy4pGAAoJEKeha0olJ0Nq8XcIAJhfCP1QYCwYivV5+sjxVeo9 C8oi+KkYKMUHOV3kEhDTFpnJNFvzyMrBg+gPQZpaMgiJgOy6NubgsCy68kvfb+9X HOjMuQRDCguhucu7wza61CNbetgzq1Bs4FysCobl9yxIPx795GmGbrChpVQAIe/9 R1HNqQBma3hpi2OkoxevTk0zsGgWcYdyiibMkOsqXoO1WBFV8SZsvPqNVX7flNUy n6q066GNsnr30vlfISPiP0wacm041CfSV+ZRaZq0pqeA3ZwwD0spg+kH7d8vfYcO nPs6qGuIJPhQS1V7RFBXwfRwheQ7NvQPzMixT3te9H//oQwhaj2OjHE894Fc8ug= =7lvh -----END PGP SIGNATURE----- --------------enig1EE3C9E1CAA93D7BD0360970--