Re: [Qemu-block] [PATCH 2/2] blockjob: Fix hang in block_job_finish_sync

2016-01-28 Thread Paolo Bonzini
On 28/01/2016 08:02, Fam Zheng wrote: > > This is because the aio_poll() only processes the AIO context of bs > which has no more work to do, while the main loop BH that is scheduled > for setting the job->completed flag is never processed. > > Fix this by adding a "ctx" pointer in BlockJob str

[Qemu-block] [PATCH v1 4/5] async.c: various atomic fixes for tsan

2016-01-28 Thread Alex Bennée
Running "make check" under ThreadSanitizer pointed to a number of potential races. - use atomic_mb_read to check bh->schedule - use atomic_set/read primitives to manipulate bh->idle The bh->idle changes are mostly for the benefit of explicit marking for tsan but the code in non-sanitised buil

Re: [Qemu-block] [PATCH v1 5/5] thread-pool: atomic fixes from tsan

2016-01-28 Thread Paolo Bonzini
On 28/01/2016 11:15, Alex Bennée wrote: > Mark changes in thread pool state as explicitly atomic. Also in the > test-thread-pool code make accesses to data.n explicitly atomic. > > Signed-off-by: Alex Bennée > --- > tests/test-thread-pool.c | 8 > thread-pool.c| 12 ++--

Re: [Qemu-block] [PATCH v1 4/5] async.c: various atomic fixes for tsan

2016-01-28 Thread Paolo Bonzini
On 28/01/2016 11:15, Alex Bennée wrote: > Running "make check" under ThreadSanitizer pointed to a number of > potential races. > > - use atomic_mb_read to check bh->schedule > - use atomic_set/read primitives to manipulate bh->idle > > The bh->idle changes are mostly for the benefit of expl

Re: [Qemu-block] [PATCH 2/2] blockjob: Fix hang in block_job_finish_sync

2016-01-28 Thread Fam Zheng
On Thu, 01/28 10:10, Paolo Bonzini wrote: > > > On 28/01/2016 08:02, Fam Zheng wrote: > > > > This is because the aio_poll() only processes the AIO context of bs > > which has no more work to do, while the main loop BH that is scheduled > > for setting the job->completed flag is never processed.

[Qemu-block] [PATCH v2 1/2] blockjob: Rename block_job_defer_to_main_loop

2016-01-28 Thread Fam Zheng
The next patch will make this function more restrictive than it is now, rename it and update comment to reflect the change. Signed-off-by: Fam Zheng --- block/backup.c| 2 +- block/commit.c| 2 +- block/mirror.c| 2 +- block/stream.c| 2 +- blo

[Qemu-block] [PATCH v2 0/2] blockjob: Fix dead loop with block_job_finish_sync on dataplane disks

2016-01-28 Thread Fam Zheng
v2: Fix the migration case. [Paolo] Fam Zheng (2): blockjob: Rename block_job_defer_to_main_loop blockjob: Fix hang in block_job_finish_sync block/backup.c| 2 +- block/commit.c| 2 +- block/mirror.c| 2 +- block/stream.c| 2 +- blockjob.c

[Qemu-block] [PATCH v2 2/2] blockjob: Fix hang in block_job_finish_sync

2016-01-28 Thread Fam Zheng
With a mirror job running on a virtio-blk dataplane disk, sending "q" to HMP will cause a dead loop in block_job_finish_sync. This is because the aio_poll() only processes the AIO context of bs which has no more work to do, while the main loop BH that is scheduled for setting the job->completed fl

Re: [Qemu-block] [PATCH] block: Remove unused struct definition BlockFinishData

2016-01-28 Thread Stefan Hajnoczi
On Thu, Jan 28, 2016 at 11:57:13AM +0800, Fam Zheng wrote: > Unused since 94db6d2d3. > > Signed-off-by: Fam Zheng > --- > blockjob.c | 8 > 1 file changed, 8 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-block] [PATCH 1/2] blockjob: Rename block_job_defer_to_main_loop

2016-01-28 Thread Stefan Hajnoczi
On Thu, Jan 28, 2016 at 03:02:50PM +0800, Fam Zheng wrote: > diff --git a/include/block/blockjob.h b/include/block/blockjob.h > index d84ccd8..de59fc2 100644 > --- a/include/block/blockjob.h > +++ b/include/block/blockjob.h > @@ -393,18 +393,20 @@ BlockErrorAction block_job_error_action(BlockJob *j

Re: [Qemu-block] [PATCH 2/2] blockjob: Fix hang in block_job_finish_sync

2016-01-28 Thread Stefan Hajnoczi
On Thu, Jan 28, 2016 at 10:10:06AM +0100, Paolo Bonzini wrote: > > > On 28/01/2016 08:02, Fam Zheng wrote: > > > > This is because the aio_poll() only processes the AIO context of bs > > which has no more work to do, while the main loop BH that is scheduled > > for setting the job->completed fla

Re: [Qemu-block] [PATCH] block: Remove unused struct definition BlockFinishData

2016-01-28 Thread Kevin Wolf
Am 28.01.2016 um 04:57 hat Fam Zheng geschrieben: > Unused since 94db6d2d3. > > Signed-off-by: Fam Zheng Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH 1/2] blockjob: Rename block_job_defer_to_main_loop

2016-01-28 Thread Fam Zheng
On Thu, 01/28 11:53, Stefan Hajnoczi wrote: > On Thu, Jan 28, 2016 at 03:02:50PM +0800, Fam Zheng wrote: > > diff --git a/include/block/blockjob.h b/include/block/blockjob.h > > index d84ccd8..de59fc2 100644 > > --- a/include/block/blockjob.h > > +++ b/include/block/blockjob.h > > @@ -393,18 +393,2

Re: [Qemu-block] [Qemu-devel] QCOW rebases on running VMs

2016-01-28 Thread Eric Blake
On 01/28/2016 05:36 AM, Alex Bligh wrote: > > On 27 Jan 2016, at 20:47, Eric Blake wrote: > >>> >>> >>> If not, do I need to use QMP magic instead? >> >> Yes. block-commit is your friend. > > Sadly what I need is block-stream to an intermediate layer (as I > want to merge in the other direction

[Qemu-block] [PATCH v3] blockjob: Fix hang in block_job_finish_sync

2016-01-28 Thread Fam Zheng
With a mirror job running on a virtio-blk dataplane disk, sending "q" to HMP will cause a dead loop in block_job_finish_sync. This is because the aio_poll() only processes the AIO context of bs which has no more work to do, while the main loop BH that is scheduled for setting the job->completed fl

qemu-block@nongnu.org

2016-01-28 Thread Lluís Vilanova
Replaces all direct uses of 'error_setg(&error_fatal/abort)' with 'error_report_fatal/abort'. Also reimplements the former on top of the latter. Signed-off-by: Lluís Vilanova --- hw/block/fdc.c |6 +++--- hw/ppc/spapr.c |8 hw/ppc/spapr_drc.c |2 +- util/error.c

qemu-block@nongnu.org

2016-01-28 Thread Lluís Vilanova
Replaces all direct uses of 'error_setg(&error_fatal/abort)' with 'error_report_fatal/abort'. Also reimplements the former on top of the latter. Signed-off-by: Lluís Vilanova --- hw/block/fdc.c |6 +++--- hw/ppc/spapr.c |8 hw/ppc/spapr_drc.c |2 +- util/error.c

Re: [Qemu-block] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-01-28 Thread Wen Congyang
On 01/27/2016 07:03 PM, Dr. David Alan Gilbert wrote: > Hi, > I've got a block error if I kill the secondary. > > Start both primary & secondary > kill -9 secondary qemu > x_colo_lost_heartbeat on primary > > The guest sees a block error and the ext4 root switches to read-only. > > I gdb'd the