diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-16 16:40:02 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-20 12:27:43 +0200 |
commit | c3adb5b9168a57790b5074489b6f0275ac3cc8b5 (patch) | |
tree | 23c80fd5ded017fea0c0cde44673872498e80c83 /acl.c | |
parent | 10dc8aef419b4ce77670fb080ffe995bf9d7b0a1 (diff) |
dma-helpers: rewrite completion/cancellation
This fixes various problems with completion/cancellation:
* if the io_func fails to get an AIOCB, the callback wasn't called
* If DMA encounters a bounce buffer conflict, and the DMA operation is
canceled before the bottom half fires, bad things happen.
* memory is not unmapped after cancellation, again causing problems
when doing DMA to I/O areas
* cancellation could leak the iovec
* the callback was missed if the I/O operation failed without returning
an AIOCB
and probably more that I've missed. The patch fixes them by sharing
the cleanup code between completion and cancellation. The dma_bdrv_cb
now returns a boolean completed/not completed flag, and the wrapper
dma_continue takes care of tasks to do upon completion.
Most of these are basically impossible in practice, but it is better
to be tidy...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'acl.c')
0 files changed, 0 insertions, 0 deletions