Re: [PATCHv6] rbd block driver fix race between aio completition and aio cancel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 30, 2012 at 9:55 AM, Stefan Priebe <s.priebe@xxxxxxxxxxxx> 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.priebe@xxxxxxxxxxxx>
>
> ---
>  block/rbd.c |   20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux