qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 2/7] dma-helpers: change BlockBacke


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 2/7] dma-helpers: change BlockBackend to opaque value in DMAIOFunc
Date: Mon, 23 May 2016 09:43:26 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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).
> 
> 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.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  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(-)
> 

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]