mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
dma: use current AioContext for dma_blk_io()
In the past a single AioContext was used for block I/O and it was fetched using blk_get_aio_context(). Nowadays the block layer supports running I/O from any AioContext and multiple AioContexts at the same time. Remove the dma_blk_io() AioContext argument and use the current AioContext instead. This makes calling the function easier and enables multiple IOThreads to use dma_blk_io() concurrently for the same block device. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20250311132616.1049687-3-stefanha@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
b2e3659d0d
commit
a89c3c9b2c
5 changed files with 9 additions and 14 deletions
|
@ -187,8 +187,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
|
|||
pmac_ide_transfer_cb, io);
|
||||
break;
|
||||
case IDE_DMA_TRIM:
|
||||
s->bus->dma->aiocb = dma_blk_io(blk_get_aio_context(s->blk), &s->sg,
|
||||
offset, 0x1, ide_issue_trim, s,
|
||||
s->bus->dma->aiocb = dma_blk_io(&s->sg, offset, 0x1, ide_issue_trim, s,
|
||||
pmac_ide_transfer_cb, io,
|
||||
DMA_DIRECTION_TO_DEVICE);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue