On Fri, Nov 30, 2012 at 9:55 AM, Stefan Priebe <s.pri...@profihost.ag> wrote:
> This one fixes a race which qemu had also in iscsi block driver
> between cancellation and io completition.
>
> qemu_rbd_aio_cancel was not synchronously waiting for the end of
> the command.
>
> To archieve this it introduces a new status flag which uses
> -EINPROGRESS.
>
> Changes since PATCHv5:
> - qemu_aio_release has to be done in qemu_rbd_aio_cancel if I/O
>   was cancelled
>
> Changes since PATCHv4:
> - removed unnecessary qemu_vfree of acb->bounce as BH will always
>   run
>
> Changes since PATCHv3:
> - removed unnecessary if condition in rbd_start_aio as we
>   haven't start io yet
> - moved acb->status = 0 to rbd_aio_bh_cb so qemu_aio_wait always
>   waits until BH was executed
>
> Changes since PATCHv2:
> - fixed missing braces
> - added vfree for bounce
>
> Signed-off-by: Stefan Priebe <s.pri...@profihost.ag>
>
> ---
>  block/rbd.c |   20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefa...@gmail.com>

Reply via email to