From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avQEH-00041X-NY for qemu-devel@nongnu.org; Wed, 27 Apr 2016 10:14:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avQEE-0000La-Gb for qemu-devel@nongnu.org; Wed, 27 Apr 2016 10:14:13 -0400 References: <1461750767-23273-1-git-send-email-kwolf@redhat.com> <1461750767-23273-4-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5720C927.3070803@redhat.com> Date: Wed, 27 Apr 2016 08:13:59 -0600 MIME-Version: 1.0 In-Reply-To: <1461750767-23273-4-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gjjML5Uv1NHL2cc2c8Nht6pdSAw5J15jI" Subject: Re: [Qemu-devel] [PATCH 03/17] block: Support AIO drivers in bdrv_driver_preadv/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) --gjjML5Uv1NHL2cc2c8Nht6pdSAw5J15jI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/27/2016 03:52 AM, Kevin Wolf wrote: > Instead of registering emulation functions as .bdrv_co_writev, just > directly check whether the function is there or not, and use the AIO > interface if it isn't. This makes the read/write functions more > consistent with how things are done in other places (flush, discard, > etc.) >=20 > Signed-off-by: Kevin Wolf > --- > block/io.c | 126 +++++++++++++++++++++++++----------------------------= -------- > 1 file changed, 52 insertions(+), 74 deletions(-) >=20 > - > -static int coroutine_fn bdrv_co_io_em(BlockDriverState *bs, int64_t se= ctor_num, > - int nb_sectors, QEMUIOVector *io= v, > - bool is_write) > -{ > - CoroutineIOCompletion co =3D { > - .coroutine =3D qemu_coroutine_self(), > - }; > - BlockAIOCB *acb; > - > - if (is_write) { > - acb =3D bs->drv->bdrv_aio_writev(bs, sector_num, iov, nb_secto= rs, > - bdrv_co_io_em_complete, &co); > - } else { > - acb =3D bs->drv->bdrv_aio_readv(bs, sector_num, iov, nb_sector= s, > - bdrv_co_io_em_complete, &co); > - } > - > - trace_bdrv_co_io_em(bs, sector_num, nb_sectors, is_write, acb); I don't see any more uses of this; do you need to tweak trace-events to drop bdrv_co_io_em? With that fixed (or explained), Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gjjML5Uv1NHL2cc2c8Nht6pdSAw5J15jI 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/ iQEcBAEBCAAGBQJXIMknAAoJEKeha0olJ0Nq/bAH/RHxhs64XAkmCsBaehmh27/F KSbuvdD7nyp3YDX2kfxglr7I6pitH21CNunbN+mnidUFyMDNV8TiPqiecXvt3W1i LoaxOqpEV7PcS3tZQwldnX7T2h+nezK5Skm/aOPzHUQ9qOYKpqxLWJn//TiPKNmz 2Y5kqZfVPctOR0EE35F30/sk6G4SuFjXa/7PzMOurCg0IJnfG4m8CcKU1owXsbV9 QnV9ytBDI6i66bF6uHjEWWx/DSwVBb4945rSEf2D3CBrp5Ym54y4+0E/P+L/414r oVDzH9JPcsjCgueJbrmjyHjWBvo4Uq1PmBEv/nWuF3uPTMChIKXLJIFlQZwvreo= =tuqf -----END PGP SIGNATURE----- --gjjML5Uv1NHL2cc2c8Nht6pdSAw5J15jI--