From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeQO-0005Qf-Af for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAeQN-0002vz-3l for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:25:40 -0400 References: <1465395011-26088-1-git-send-email-kwolf@redhat.com> <1465395011-26088-2-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <57582AD8.7090500@redhat.com> Date: Wed, 8 Jun 2016 08:25:28 -0600 MIME-Version: 1.0 In-Reply-To: <1465395011-26088-2-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nb0N38dGGw063SsJsaJdrL76TBBB1a5kG" Subject: Re: [Qemu-devel] [PATCH 1/6] block: Byte-based bdrv_co_do_copy_on_readv() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: pbonzini@redhat.com, mreitz@redhat.com, stefanha@redhat.com, famz@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nb0N38dGGw063SsJsaJdrL76TBBB1a5kG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/08/2016 08:10 AM, Kevin Wolf wrote: > In a first step to convert the common I/O path to work on bytes rather > than sectors, this converts the copy-on-read logic that is used by > bdrv_aligned_preadv(). >=20 > Signed-off-by: Kevin Wolf > --- > block/io.c | 63 +++++++++++++++++++++++++++++++------------= -------- > block/mirror.c | 10 ++++---- > include/block/block.h | 10 +++++--- > 3 files changed, 51 insertions(+), 32 deletions(-) >=20 > @@ -873,21 +893,20 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(= BlockDriverState *bs, > BlockDriver *drv =3D bs->drv; > struct iovec iov; > QEMUIOVector bounce_qiov; > - int64_t cluster_sector_num; > - int cluster_nb_sectors; > + int64_t cluster_offset; > + unsigned int cluster_bytes; > size_t skip_bytes; > int ret; > =20 > /* Cover entire cluster so no additional backing file I/O is requi= red when > * allocating cluster in the image file. > */ > - bdrv_round_to_clusters(bs, sector_num, nb_sectors, > - &cluster_sector_num, &cluster_nb_sectors); > + bdrv_round_to_clusters(bs, offset, bytes, &cluster_offset, &cluste= r_bytes); > =20 > - trace_bdrv_co_do_copy_on_readv(bs, sector_num, nb_sectors, > - cluster_sector_num, cluster_nb_sect= ors); > + trace_bdrv_co_do_copy_on_readv(bs, offset, bytes, > + cluster_offset, cluster_bytes); Missing patch to trace-events to advertise new semantics. With that fixed, Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --nb0N38dGGw063SsJsaJdrL76TBBB1a5kG 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/ iQEcBAEBCAAGBQJXWCrYAAoJEKeha0olJ0NqW1AIAIzkdyMIieWoBFNowiOGIAJi wnOrk4qjauLPWvMly4sJ/KFm1egsrVde5hid+goyaLu2B7Jq4RC7f8BydP2POu7L DSRl6ezuQ8qNSvBJr4C8+dM8P/z6FyrehmHOxnGw9pVBYbof9OQUU6/gtms1LYlW PeQp30It5UxcTNzuBntKOZjEejOiEitJISluh52bmRQRdgYcCLY6m0gA9LEn6UYU aNOWgNvI3J/DsJ8JRZF6e5xovoSiet+2Q5Sw3Gq5Qz53cxC32i9IpkyFAsdUc9ac qMC5U3zj/OYA4xEBhEq1z+6Y+ln7G18MOdNF5zYsJXUZXOWrPZYBlqMVLO7xTVw= =xvpc -----END PGP SIGNATURE----- --nb0N38dGGw063SsJsaJdrL76TBBB1a5kG--