From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZR9-000240-LG for qemu-devel@nongnu.org; Wed, 01 Aug 2012 09:58:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwZR5-0002xA-GL for qemu-devel@nongnu.org; Wed, 01 Aug 2012 09:58:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZR5-0002x4-63 for qemu-devel@nongnu.org; Wed, 01 Aug 2012 09:58:03 -0400 Message-ID: <501935E7.8000607@redhat.com> Date: Wed, 01 Aug 2012 07:57:59 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343753510-24661-1-git-send-email-wdongxu@linux.vnet.ibm.com> <1343753510-24661-3-git-send-email-wdongxu@linux.vnet.ibm.com> In-Reply-To: <1343753510-24661-3-git-send-email-wdongxu@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA65C19EF848E99672A8C42F5" Subject: Re: [Qemu-devel] [PATCH 3/6] add-cow file format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dong Xu Wang Cc: kwolf@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA65C19EF848E99672A8C42F5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/31/2012 10:51 AM, Dong Xu Wang wrote: > This is the implementation code for add-cow file format. Because image_= file > might be very huge, then we can't read entire bitmap into memory, we mu= st use > a cache. Since qcow-cache.c has implemted cache code, we can create our= cache s/implemted/implemented/ > code based on it. Just wondering if Paolo's HBitmap code for drive-mirror might be a more efficient way to implement your caching. >=20 > Signed-off-by: Dong Xu Wang > --- > block/Makefile.objs | 1 + > block/add-cow-cache.c | 206 +++++++++++++++++ > block/add-cow.c | 599 +++++++++++++++++++++++++++++++++++++++++= ++++++++ > block/add-cow.h | 101 +++++++++ > block_int.h | 2 + Rather than adding a new implementation for code duplication, can you refactor the existing implementation to be reusable, and update qcow-cache.c to call into the common refactored code? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA65C19EF848E99672A8C42F5 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 Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQGTXnAAoJEKeha0olJ0Nq7rgH/AgTxCis21BuJPk48hOqW8GR /ggekGyTmiuCfC+jApPRkNI3dQdUZ7dlZQwIIaKgkB6VfEKVt7kIWGOIBZQrGB5/ fhFoC2RrHKYavFTjnMqUysdT7Ioycn2RIYWtJVvUZWmqciyhoyOKpJSPc7vWV2QY rqFld8KBkrNm2tCTyN1n6IL5ueohxgQuVoJJ3ouGXNKwBp1keK7Zm1tQgi1TwgTM AjC2FhIbsi4veu61NUFC4/fX/Tjh115z+BvlkJgDXe8QcrRPlrhk9GMmR4DjACKS XWSSVzQZhM+POFuZEXTyeLGkoZ1DsvjaoS1A7CK+Kwa3d3L6DfG271oECqXCR5M= =OiQ8 -----END PGP SIGNATURE----- --------------enigA65C19EF848E99672A8C42F5--