]> xenbits.xensource.com Git - qemu-xen-4.0-testing.git/commit
fix raw_aio_read/write error handling
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 5 Feb 2009 14:45:25 +0000 (14:45 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 5 Feb 2009 14:45:25 +0000 (14:45 +0000)
commit52272258d2ce2169dcf0cc83b1eaf5959ed75ea8
tree45bf0c95f18f6282954abac3c7a0fc909d63f23c
parentf11a760defe50eafbb16754ca4f0abac85cc7e66
fix raw_aio_read/write error handling

Currently when qemu_paio_read or qemu_paio_write return an error we call
qemu_aio_release without removing the request from the list.
I know that in the current implementation qemu_paio_write/read don't return
any error, but still the behavior is wrong, especially considering
that the implementation of these two functions is likely to change in is
the future.
This patch fixes the problem adding a raw_aio_remove function that
removes the callback from the queue and also calls qemu_aio_release.
raw_aio_remove is called by raw_aio_read, raw_aio_write and
raw_aio_cancel.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Backported-by: Ian Jackson <ian.jackson@eu.citrix.com>
block-raw-posix.c