From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c514i-0006ft-1K for qemu-devel@nongnu.org; Thu, 10 Nov 2016 20:56:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c514h-00028u-5D for qemu-devel@nongnu.org; Thu, 10 Nov 2016 20:56:16 -0500 References: <1478798349-28983-1-git-send-email-kwolf@redhat.com> <1478798349-28983-4-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: Date: Thu, 10 Nov 2016 19:56:06 -0600 MIME-Version: 1.0 In-Reply-To: <1478798349-28983-4-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tCp7IKrgW7J9hqGJiD7XtVBp35tKHt3sb" Subject: Re: [Qemu-devel] [RFC PATCH 3/8] quorum: Implement .bdrv_co_readv/writev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tCp7IKrgW7J9hqGJiD7XtVBp35tKHt3sb From: Eric Blake To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org, mreitz@redhat.com Message-ID: Subject: Re: [Qemu-devel] [RFC PATCH 3/8] quorum: Implement .bdrv_co_readv/writev References: <1478798349-28983-1-git-send-email-kwolf@redhat.com> <1478798349-28983-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1478798349-28983-4-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/10/2016 11:19 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/quorum.c | 194 ++++++++++++++++++++++++++++++++++---------------= -------- > 1 file changed, 117 insertions(+), 77 deletions(-) >=20 > + > +static void read_quorum_children_entry(void *opaque) > +{ > + QuorumCo *co =3D opaque; > + QuorumAIOCB *acb =3D co->acb; > + BDRVQuorumState *s =3D acb->bs->opaque; > + int i =3D co->i; > + int ret; > + co =3D NULL; /* Not valid after the first yield */ Why bother to invalidate co... > + > + acb->qcrs[i].bs =3D s->children[i]->bs; > + ret =3D bdrv_co_preadv(s->children[i], acb->sector_num * BDRV_SECT= OR_SIZE, > + acb->nb_sectors * BDRV_SECTOR_SIZE, > + &acb->qcrs[i].qiov, 0); > + quorum_aio_cb(&acb->qcrs[i], ret); > +} =2E..when it isn't used later? Is it just for future-proofing edits made in later patches? > +static void write_quorum_entry(void *opaque) > +{ > + QuorumCo *co =3D opaque; > + QuorumAIOCB *acb =3D co->acb; > + BDRVQuorumState *s =3D acb->bs->opaque; > + int i =3D co->i; > + int ret; > + co =3D NULL; /* Not valid after the first yield */ > + > + acb->qcrs[i].bs =3D s->children[i]->bs; > + ret =3D bdrv_co_pwritev(s->children[i], acb->sector_num * BDRV_SEC= TOR_SIZE, > + acb->nb_sectors * BDRV_SECTOR_SIZE, acb->qio= v, 0); > + quorum_aio_cb(&acb->qcrs[i], ret); > } and again Otherwise, the conversion looks sane to me, but I'm just weak enough on coroutines that I won't give R-b while this is still in RFC --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --tCp7IKrgW7J9hqGJiD7XtVBp35tKHt3sb 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/ iQEcBAEBCAAGBQJYJSU2AAoJEKeha0olJ0NqxvcIAIx4tFJvbNc35WZbtyVepfbB LAbU5QN3WiQ9Vpy6cVDOkRO5mOsY/ilgOApJ6nF9Yo3/1C8/+jo9yIn/Yrg2celj U8IpOZWxPupxjeGiSgn+eiEoLjIkuju4d3MIfBHCI7v3A6zDWbU67z0xr0h1KMeN 4wKdHUhY4MVJ8OEtat8D2r1uaFZDJH8yGMRhYmoKvntVo/64b7wnUbOoD9052Ea3 hwcCtqVbEQeiTBeACXs40nVD4v3tJ0XiycNxXYO6UzUfvzL6PuWO2NPLa4b71B1V 7e3dnKwNG23/8uwts8D5vABvCtVjCejr3OYtso5b/eq9aw0eNPm3ZiGVq/jeEgE= =CuOi -----END PGP SIGNATURE----- --tCp7IKrgW7J9hqGJiD7XtVBp35tKHt3sb--