Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Stefan Hajnoczi
On Mon, Feb 11, 2013 at 2:54 PM, Paolo Bonzini wrote: > Il 11/02/2013 14:29, Kevin Wolf ha scritto: >> Am 11.02.2013 14:17, schrieb Stefan Hajnoczi: >>> On Mon, Feb 11, 2013 at 1:42 PM, Paolo Bonzini wrote: Il 11/02/2013 13:29, Kevin Wolf ha scritto: > The bug is not in this function but

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Paolo Bonzini
Il 11/02/2013 14:29, Kevin Wolf ha scritto: > Am 11.02.2013 14:17, schrieb Stefan Hajnoczi: >> On Mon, Feb 11, 2013 at 1:42 PM, Paolo Bonzini wrote: >>> Il 11/02/2013 13:29, Kevin Wolf ha scritto: The bug is not in this function but in process_incoming_migration(). It should never blindl

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Kevin Wolf
Am 11.02.2013 13:42, schrieb Paolo Bonzini: > Il 11/02/2013 13:29, Kevin Wolf ha scritto: >> The bug is not in this function but in process_incoming_migration(). It >> should never blindly enter a coroutine which is in an unknown state. > > process_incoming_migration() is the function that _create

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Kevin Wolf
Am 11.02.2013 14:17, schrieb Stefan Hajnoczi: > On Mon, Feb 11, 2013 at 1:42 PM, Paolo Bonzini wrote: >> Il 11/02/2013 13:29, Kevin Wolf ha scritto: >>> The bug is not in this function but in process_incoming_migration(). It >>> should never blindly enter a coroutine which is in an unknown state.

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Stefan Hajnoczi
On Mon, Feb 11, 2013 at 1:42 PM, Paolo Bonzini wrote: > Il 11/02/2013 13:29, Kevin Wolf ha scritto: >> The bug is not in this function but in process_incoming_migration(). It >> should never blindly enter a coroutine which is in an unknown state. > > process_incoming_migration() is the function th

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Paolo Bonzini
Il 11/02/2013 13:29, Kevin Wolf ha scritto: > The bug is not in this function but in process_incoming_migration(). It > should never blindly enter a coroutine which is in an unknown state. process_incoming_migration() is the function that _creates_ the coroutine and enters it for the first time, s

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Kevin Wolf
Am 09.02.2013 17:44, schrieb Stefan Hajnoczi: > bdrv_co_io_em(), bdrv_co_flush(), and bdrv_co_discard() yield the > coroutine when waiting for aio to complete. They do not check that the > request has actually finished. > > In simple cases this works, but it returns early when we get spurious > w

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Paolo Bonzini
Il 11/02/2013 11:57, Stefan Hajnoczi ha scritto: >> > I would prefer to have ret initialized to -EINPROGRESS, but since we're >> > close to release it's easier this way. > I did it that way first but then I felt a little paranoid about using > the return value space as the sentinel. Granted, most

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Stefan Hajnoczi
On Mon, Feb 11, 2013 at 11:16:09AM +0100, Paolo Bonzini wrote: > Il 09/02/2013 17:44, Stefan Hajnoczi ha scritto: > > bdrv_co_io_em(), bdrv_co_flush(), and bdrv_co_discard() yield the > > coroutine when waiting for aio to complete. They do not check that the > > request has actually finished. > >

Re: [Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-11 Thread Paolo Bonzini
Il 09/02/2013 17:44, Stefan Hajnoczi ha scritto: > bdrv_co_io_em(), bdrv_co_flush(), and bdrv_co_discard() yield the > coroutine when waiting for aio to complete. They do not check that the > request has actually finished. > > In simple cases this works, but it returns early when we get spurious

[Qemu-devel] [PATCH for-1.4 stable] block: handle spurious coroutine entries

2013-02-09 Thread Stefan Hajnoczi
bdrv_co_io_em(), bdrv_co_flush(), and bdrv_co_discard() yield the coroutine when waiting for aio to complete. They do not check that the request has actually finished. In simple cases this works, but it returns early when we get spurious wake-ups due to qemu_coroutine_enter() being called from ot