diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2025-03-11 21:26:05 +0800 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2025-03-13 17:57:23 +0100 |
| commit | a89c3c9b2cc4107658c7260ecf329d869888fd51 (patch) | |
| tree | 5b1d47b94e5e27fe8b731e06de5465a5c4c0ea16 /hw/ide/core.c | |
| parent | b2e3659d0d769c84f5b15239a93a722c8012bffa (diff) | |
| download | focaccia-qemu-a89c3c9b2cc4107658c7260ecf329d869888fd51.tar.gz focaccia-qemu-a89c3c9b2cc4107658c7260ecf329d869888fd51.zip | |
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>
Diffstat (limited to 'hw/ide/core.c')
| -rw-r--r-- | hw/ide/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index f9baba59e9..b14983ec54 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -968,8 +968,7 @@ static void ide_dma_cb(void *opaque, int ret) BDRV_SECTOR_SIZE, ide_dma_cb, s); break; case IDE_DMA_TRIM: - s->bus->dma->aiocb = dma_blk_io(blk_get_aio_context(s->blk), - &s->sg, offset, BDRV_SECTOR_SIZE, + s->bus->dma->aiocb = dma_blk_io(&s->sg, offset, BDRV_SECTOR_SIZE, ide_issue_trim, s, ide_dma_cb, s, DMA_DIRECTION_TO_DEVICE); break; |