From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awcqe-00043g-Ui for qemu-devel@nongnu.org; Sat, 30 Apr 2016 17:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awcqT-0002fR-8S for qemu-devel@nongnu.org; Sat, 30 Apr 2016 17:54:43 -0400 References: <1461849406-29743-1-git-send-email-kwolf@redhat.com> <1461849406-29743-3-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <57252978.5090502@redhat.com> Date: Sat, 30 Apr 2016 15:54:00 -0600 MIME-Version: 1.0 In-Reply-To: <1461849406-29743-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IEPOMXT3me6E6Kg1WTHiuHCO0PXclwakk" Subject: Re: [Qemu-devel] [PATCH v2 02/17] block: Introduce bdrv_driver_pwritev() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: famz@redhat.com, sw@weilnetz.de, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IEPOMXT3me6E6Kg1WTHiuHCO0PXclwakk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/28/2016 07:16 AM, Kevin Wolf wrote: > This is a function that simply calls into the block driver for doing a > write, providing the byte granularity interface we want to eventually > have everywhere, and using whatever interface that driver supports. >=20 > This one is a bit more interesting that the version for reads: It adds > support for .bdrv_co_writev_flags() everywhere, so that drivers > implementing this function can drop .bdrv_co_writev() now. >=20 > Signed-off-by: Kevin Wolf > Reviewed-by: Eric Blake > --- > @@ -1155,7 +1186,8 @@ static int coroutine_fn bdrv_co_do_write_zeroes(B= lockDriverState *bs, > } > qemu_iovec_init_external(&qiov, &iov, 1); > =20 > - ret =3D drv->bdrv_co_writev(bs, sector_num, num, &qiov); > + ret =3D bdrv_driver_pwritev(bs, sector_num * BDRV_SECTOR_S= IZE, > + num * BDRV_SECTOR_SIZE, &qiov, 0= ); My review missed a latent bug here (pre-patch this should have been using bdrv_co_writev_flags(..., flags & ~BDRV_REQ_ZERO_WRITE) so as to keep BDRV_REQ_FUA semantics working), so as penance I've sent a patch. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IEPOMXT3me6E6Kg1WTHiuHCO0PXclwakk 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/ iQEcBAEBCAAGBQJXJSl4AAoJEKeha0olJ0NqjnEIAJJLibTb3SRK2QOsx4dJvLPs ZGW6b4lif7TW1pquTOGzM3buKnRG4g8M+YW740pISHzn/G8jGEk4qzuYbJgbl4rH Qmi/Fm1csBvBuMjzhO/YTmyIJHHnU4Jvm83rvC7Fy7ribRr8JHhEH6e3WzGBMvB0 kcSJ6j1XR9eNPMBOK/xjdpc5n95f3wAuKjC625WxVmtNM8K/9IRbe5D9oxgCNM71 LnmkSUQ5CTnq3YpKIqIzCSIoBYBQUA8Jg5g3L6GQCA4VpMlj1tC0SdOz6jiUIOxl bpx3TWxGEK128E2grTZ11LUXIp1TV5SRAc2qZkBjNXSk7WYmxrrNq5hv13MAufk= =5i9A -----END PGP SIGNATURE----- --IEPOMXT3me6E6Kg1WTHiuHCO0PXclwakk--