rbd: Fix race between aio completition and aio cancel
authorStefan Priebe <s.priebe@profihost.ag>
Fri, 30 Nov 2012 08:55:46 +0000 (09:55 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 11 Dec 2012 10:05:11 +0000 (11:05 +0100)
commit473c7f0255920bcaf37411990a3725898772817f
tree9e6254bdbf1ad891fd2a786fdee9b4f5b507e655
parent791bfa35ee00ca10b13bedfb048ffda385b151c7
rbd: Fix race between aio completition and aio cancel

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.

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/rbd.c