[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] dma-helpers: dma_blk_io() cancel support
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] dma-helpers: dma_blk_io() cancel support |
Date: |
Wed, 22 Jun 2016 13:17:54 +0100 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Mon, Jun 20, 2016 at 08:36:57PM +0100, Stefan Hajnoczi wrote:
> Attempting to cancel a dma_blk_io() request causes an abort(3):
>
> void bdrv_aio_cancel(BlockAIOCB *acb)
> {
> ...
> while (acb->refcnt > 1) {
> if (acb->aiocb_info->get_aio_context) {
> aio_poll(acb->aiocb_info->get_aio_context(acb), true);
> } else if (acb->bs) {
> aio_poll(bdrv_get_aio_context(acb->bs), true);
> } else {
> abort();
> }
> }
> ...
> }
>
> This happens because DMAAIOCB->bs is NULL and
> dma_aiocb_info.get_aio_context() is also NULL.
>
> This patch trivially implements dma_aiocb_info.get_aio_context() by
> fetching the DMAAIOCB->ctx field.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> dma-helpers.c | 7 +++++++
> 1 file changed, 7 insertions(+)
dma-helpers.c has no maintainer, I'll take this through my tree.
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
signature.asc
Description: PGP signature