Re: [Qemu-devel] [PATCH 18/41] block-migration: add lock

2013-02-22 Thread Paolo Bonzini
Il 22/02/2013 11:59, Juan Quintela ha scritto: > Paolo Bonzini wrote: >> Some state is shared between the block migration code and its AIO >> callbacks. Once block migration will run outside the iothread, >> the block migration code and the AIO callbacks will be able to >> run concurrently. Prot

Re: [Qemu-devel] [PATCH 18/41] block-migration: add lock

2013-02-22 Thread Juan Quintela
Paolo Bonzini wrote: > Some state is shared between the block migration code and its AIO > callbacks. Once block migration will run outside the iothread, > the block migration code and the AIO callbacks will be able to > run concurrently. Protect the critical sections with a separate > lock. Do

Re: [Qemu-devel] [PATCH 18/41] block-migration: add lock

2013-02-18 Thread Paolo Bonzini
Il 18/02/2013 15:33, Orit Wasserman ha scritto: >> @@ -199,6 +222,7 @@ static void blk_mig_read_cb(void *opaque, int ret) >> >> block_mig_state.submitted--; >> block_mig_state.read_done++; >> +blk_mig_unlock(); >> assert(block_mig_state.submitted >= 0); > Shouldn't the assert b

Re: [Qemu-devel] [PATCH 18/41] block-migration: add lock

2013-02-18 Thread Orit Wasserman
On 02/15/2013 07:46 PM, Paolo Bonzini wrote: > Some state is shared between the block migration code and its AIO > callbacks. Once block migration will run outside the iothread, > the block migration code and the AIO callbacks will be able to > run concurrently. Protect the critical sections with

[Qemu-devel] [PATCH 18/41] block-migration: add lock

2013-02-15 Thread Paolo Bonzini
Some state is shared between the block migration code and its AIO callbacks. Once block migration will run outside the iothread, the block migration code and the AIO callbacks will be able to run concurrently. Protect the critical sections with a separate lock. Do the same for completed_sectors,