From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYGA-00015Z-3C for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:14:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYG5-0004fN-1z for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:14:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYG4-0004fJ-Pz for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:14:52 -0400 References: <1464686130-12265-1-git-send-email-den@openvz.org> <1464686130-12265-4-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <575F143A.9010406@redhat.com> Date: Mon, 13 Jun 2016 14:14:50 -0600 MIME-Version: 1.0 In-Reply-To: <1464686130-12265-4-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GLafxGIvpULa49HNEaRlDrctr87116eph" Subject: Re: [Qemu-devel] [PATCH 03/11] qcow2: add qcow2_co_write_compressed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-devel@nongnu.org Cc: Pavel Butsykin , Jeff Cody , Markus Armbruster , John Snow , Stefan Hajnoczi , Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GLafxGIvpULa49HNEaRlDrctr87116eph Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/31/2016 03:15 AM, Denis V. Lunev wrote: > From: Pavel Butsykin >=20 > Added implementation of the qcow2_co_write_compressed function that > will allow us to safely use compressed writes for the qcow2 from runnin= g VMs. >=20 > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Jeff Cody > CC: Markus Armbruster > CC: Eric Blake > CC: John Snow > CC: Stefan Hajnoczi > CC: Kevin Wolf > --- > block/qcow2.c | 89 ++++++++++++++++++++++++++++++++++-----------------= -------- > 1 file changed, 52 insertions(+), 37 deletions(-) >=20 > diff --git a/block/qcow2.c b/block/qcow2.c > index c9306a7..38caa66 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -2535,13 +2535,16 @@ static int qcow2_truncate(BlockDriverState *bs,= int64_t offset) > =20 > /* XXX: put compressed sectors first, then all the cluster aligned > tables to avoid losing bytes in alignment */ > -static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector= _num, > - const uint8_t *buf, int nb_sectors) > +static coroutine_fn int > +qcow2_co_write_compressed(BlockDriverState *bs, int64_t sector_num, > + int nb_sectors, QEMUIOVector *qiov) Is it worth converting to a byte-based qcow2_co_pwrite_compressed() while at it? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GLafxGIvpULa49HNEaRlDrctr87116eph Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXXxQ6AAoJEKeha0olJ0NqYPUH/Rlan9tFsWgePMy2DjkOmI16 N/CGU6+dunjnIjnuhC6S5YYyYN0RhGYyf60se0j2A++wvGiZnrPW8J7MdqmwHtS4 occIP0erlWD+CerymySNFKRjKI1GhPXyK3hn2OgJGEfE8TClejFepYNQAQFGgukc 5GIhgfasJ3W4aOK70Lf5iBY0aafMQ0ypbiKeg2YnDes+Fcpg6qWq3WfPdimXt3rH 3HyNSBI06J4d4l2wG4/T4W/S4LuPVlJ0l1ofAoo7w6T4sVCe9SZP+v+q+Cbf/xs4 QD3mBIIq83o1Ig5k3JjhuTA9cs/wSGaCfsaESSz8WBnY5aqoH3n7vPNV+hNGEso= =6asw -----END PGP SIGNATURE----- --GLafxGIvpULa49HNEaRlDrctr87116eph--