From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4s13-0006sW-Hx for qemu-devel@nongnu.org; Mon, 23 May 2016 11:43:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4s10-0003sM-B2 for qemu-devel@nongnu.org; Mon, 23 May 2016 11:43:35 -0400 References: <1464008051-6429-1-git-send-email-pbonzini@redhat.com> <1464008051-6429-3-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <5743251E.3050506@redhat.com> Date: Mon, 23 May 2016 09:43:26 -0600 MIME-Version: 1.0 In-Reply-To: <1464008051-6429-3-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PTfw7RKxXGVrTtKiBe1PrIHFq0dOv3Njj" Subject: Re: [Qemu-devel] [PATCH 2/7] dma-helpers: change BlockBackend to opaque value in DMAIOFunc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PTfw7RKxXGVrTtKiBe1PrIHFq0dOv3Njj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/23/2016 06:54 AM, Paolo Bonzini wrote: > Callers of dma_blk_io have no way to pass extra data to the DMAIOFunc, > because the original callback and opaque are gone by the time DMAIOFunc= > is called. On the other hand, the BlockBackend is usually derived > from those extra data that you could pass to the DMAIOFunc (in the > next patch, that would be the SCSIRequest). >=20 > So change DMAIOFunc's prototype, decoupling it from blk_aio_readv > and blk_aio_writev's. The new prototype loses the BlockBackend > and gains an extra opaque value which, in the case of dma_blk_readv > and dma_blk_writev, is of course used for the BlockBackend. >=20 > Signed-off-by: Paolo Bonzini > --- > dma-helpers.c | 48 +++++++++++++++++++++++++++++++++++---------= ---- > hw/ide/core.c | 14 ++++++++------ > hw/ide/internal.h | 6 +++--- > hw/ide/macio.c | 2 +- > include/sysemu/dma.h | 12 ++++++------ > 5 files changed, 53 insertions(+), 29 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --PTfw7RKxXGVrTtKiBe1PrIHFq0dOv3Njj 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/ iQEcBAEBCAAGBQJXQyUeAAoJEKeha0olJ0NqZwQH/3sG6i1fyZocupOCvCdW17R+ s9z4CdkkCIz28z09AaM3F3HB8aWM4Wj83APZzTDmpg9kmrai/QM2i2KiQT14t4fD 3yzLZpmPUTNra+OhBueG6biKLv3BrbvFQVIbqn0PhXRj4i1K9L9ZjCdDRnFxxBu3 gCol+tRduI/HvoKMpz9Cq7l/nyZRs3HYKG5Uh6JJ+ttvr8tzNhQ9KfBPrm5yLiuo o/Ne99SRhmNpbUktvBn/A3pv8d1yANb/uVl6RmIM0Q+XhdehqZK7zgWxXIORmZ0G eSyvUlvsh3vtzSC5PtBjXrhnF2d+EM6Od9tSrtM6QMqQjoKSCSwx+QH4Je6MXkM= =sKbD -----END PGP SIGNATURE----- --PTfw7RKxXGVrTtKiBe1PrIHFq0dOv3Njj--