From 8a8e63ebdd5a6605af6a9df07c62b2214e1a650c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 23 May 2016 14:54:06 +0200 Subject: dma-helpers: change BlockBackend to opaque value in DMAIOFunc 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 Signed-off-by: Kevin Wolf --- hw/ide/internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/ide/internal.h') diff --git a/hw/ide/internal.h b/hw/ide/internal.h index ceb9e5994a..773928af77 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -613,9 +613,9 @@ void ide_transfer_start(IDEState *s, uint8_t *buf, int size, EndTransferFunc *end_transfer_func); void ide_transfer_stop(IDEState *s); void ide_set_inactive(IDEState *s, bool more); -BlockAIOCB *ide_issue_trim(BlockBackend *blk, - int64_t offset, QEMUIOVector *qiov, BdrvRequestFlags flags, - BlockCompletionFunc *cb, void *opaque); +BlockAIOCB *ide_issue_trim( + int64_t offset, QEMUIOVector *qiov, + BlockCompletionFunc *cb, void *cb_opaque, void *opaque); BlockAIOCB *ide_buffered_readv(IDEState *s, int64_t sector_num, QEMUIOVector *iov, int nb_sectors, BlockCompletionFunc *cb, void *opaque); -- cgit 1.4.1