diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2023-09-12 19:10:33 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-09-20 17:46:01 +0200 |
commit | 652b0dd80815cdb03db9320572be1cc9f9f664a1 (patch) | |
tree | 3abdca8f01e6c26f23ea874f92d75b05472c6848 /softmmu/dma-helpers.c | |
parent | 52b10c9c0c68e90f9503ba578f2eaf8975c1977f (diff) | |
download | qemu-652b0dd80815cdb03db9320572be1cc9f9f664a1.zip qemu-652b0dd80815cdb03db9320572be1cc9f9f664a1.tar.gz qemu-652b0dd80815cdb03db9320572be1cc9f9f664a1.tar.bz2 |
block: remove AIOCBInfo->get_aio_context()
The synchronous bdrv_aio_cancel() function needs the acb's AioContext so
it can call aio_poll() to wait for cancellation.
It turns out that all users run under the BQL in the main AioContext, so
this callback is not needed.
Remove the callback, mark bdrv_aio_cancel() GLOBAL_STATE_CODE just like
its blk_aio_cancel() caller, and poll the main loop AioContext.
The purpose of this cleanup is to identify bdrv_aio_cancel() as an API
that does not work with the multi-queue block layer.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230912231037.826804-2-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'softmmu/dma-helpers.c')
-rw-r--r-- | softmmu/dma-helpers.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/softmmu/dma-helpers.c b/softmmu/dma-helpers.c index 2463964..36211ac 100644 --- a/softmmu/dma-helpers.c +++ b/softmmu/dma-helpers.c @@ -206,17 +206,9 @@ static void dma_aio_cancel(BlockAIOCB *acb) } } -static AioContext *dma_get_aio_context(BlockAIOCB *acb) -{ - DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common); - - return dbs->ctx; -} - static const AIOCBInfo dma_aiocb_info = { .aiocb_size = sizeof(DMAAIOCB), .cancel_async = dma_aio_cancel, - .get_aio_context = dma_get_aio_context, }; BlockAIOCB *dma_blk_io(AioContext *ctx, |