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>
Showing
- block/block-backend.c 0 additions, 17 deletionsblock/block-backend.c
- block/io.c 8 additions, 15 deletionsblock/io.c
- hw/nvme/ctrl.c 0 additions, 7 deletionshw/nvme/ctrl.c
- include/block/aio.h 0 additions, 1 deletioninclude/block/aio.h
- include/block/block-global-state.h 2 additions, 0 deletionsinclude/block/block-global-state.h
- include/block/block-io.h 0 additions, 1 deletioninclude/block/block-io.h
- softmmu/dma-helpers.c 0 additions, 8 deletionssoftmmu/dma-helpers.c
- util/thread-pool.c 0 additions, 8 deletionsutil/thread-pool.c
Loading
Please register or sign in to comment