[Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-13 Thread sochin.jiang
From: "sochin.jiang" img_commit could fall into infinite loop if it's blockjob fail encountering any I/O error. Try to fix it. Signed-off-by: sochin.jiang --- qemu-img.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 0

Re: [Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-14 Thread sochin.jiang
All right, Thanks... On 2017/6/14 14:46, Fam Zheng wrote: > On Tue, 06/13 23:33, no-re...@patchew.org wrote: >> In file included from /tmp/qemu-test/src/hw/net/vmxnet3.c:30: >> /tmp/qemu-test/src/include/migration/register.h:18: error: redefinition of >> typedef ‘LoadStateHandler’ >> /tmp/qemu-

Re: [Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-14 Thread sochin.jiang
"json:{'driver':'raw','file':{ > 'driver':'blkdebug','inject-error':[{'event':'write_aio'}], > 'image':{'driver':'null-co'}}}" \ > overlay.qcow2 >

Re: [Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-14 Thread sochin.jiang
I realized blockjob is freed after completed unless we call block_job_ref() before run_block_job is called. On 2017/6/15 10:38, sochin.jiang wrote: > Thanks for your kindly reply. > > I do have made a mistake that ignoring the AIOContext lock. > > About the patch, firstly, if jo

[Qemu-devel] [PATCH] fix: avoid an infinite loop or a dangling pointer problem in img_commit

2017-06-14 Thread sochin.jiang
From: "sochin.jiang" img_commit could fall into an infinite loop calling run_block_job() if its blockjob fails on any I/O error, fix this already known problem. Signed-off-by: sochin.jiang --- blockjob.c | 4 ++-- include/block/blockjob.h | 18 ++

Re: [Qemu-devel] [PATCH] fix: avoid an infinite loop or a dangling pointer problem in img_commit

2017-06-16 Thread sochin.jiang
Good advice, thank you, Max. On 2017/6/16 21:27, Max Reitz wrote: > On 2017-06-15 08:47, sochin.jiang wrote: >> From: "sochin.jiang" >> >> img_commit could fall into an infinite loop calling run_block_job() if >> its blockjob fails on any I/O error, fix thi

[Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring.

2017-06-26 Thread sochin.jiang
From: "sochin.jiang" mirror_complete opens the backings, BDSs of the new open backings should have a same AioContext with the top when using iothreads, fix the code to guarantee this, also avoiding unexpected qemu exit(assert fails in bdrv_attach_child). Signed-off-by: so

[Qemu-devel] [PATCH] blockjob: cancel blockjobs before stopping all iothreads

2017-06-02 Thread sochin.jiang
From: "sochin.jiang" commit 88b062c and commit c9d1a56 introduce BDRV_POLL_WHILE, checking bs->in_flight in the main thread and exit till bs->in_flight reaches 0. This leaves a chance that BDRV_POLL_WHILE will hang until iothread complete the relative block job when bdrv_drai

[Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info

2017-06-06 Thread sochin.jiang
From: "sochin.jiang" Supplement the omitted 'disk size' bytes information when using 'qemu-img info',it is useful in some occasion. Anyhow, it looks strange that 'virtual size' has bytes while actual 'disk size' does not. Signed-off-by:

Re: [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info

2017-06-06 Thread sochin.jiang
Please ignore this patch, I realize that there are some unfixed problems, like iotest, etc. On 2017/6/6 15:03, sochin.jiang wrote: > From: "sochin.jiang" > > Supplement the omitted 'disk size' bytes information when using > > 'qemu-img info',it

Re: [Qemu-devel] [Qemu-block] [PATCH] blockjob: cancel blockjobs before stopping all iothreads

2017-06-08 Thread sochin.jiang
Indeed, thank you for replying and reminding. I'll be more careful next time. On 2017/6/7 17:46, Alberto Garcia wrote: > On Sat 03 Jun 2017 07:48:37 AM CEST, sochin.jiang wrote: > >> --- a/block.c >> +++ b/block.c >> @@ -3084,9 +3084,16 @@ static void bd

Re: [Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring.

2017-06-28 Thread sochin.jiang
Oh,I got it, thanks. Sochin On 2017/6/29 6:33, Max Reitz wrote: > On 2017-06-26 13:04, sochin.jiang wrote: >> From: "sochin.jiang" >> >> mirror_complete opens the backings, BDSs of the new open backings should >> have a >> same AioContext with th

[Qemu-devel] [PATCH] channel-file: fix wrong parameter comments

2017-03-24 Thread sochin.jiang
From: "sochin.jiang" fix wrong parameter comments in channel-file.h. Signed-off-by: sochin.jiang --- include/io/channel-file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/io/channel-file.h b/include/io/channel-file.h index d2462c2..79245f1 10

Re: [Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination

2016-12-19 Thread sochin.jiang
Well, that makes sense, I lose my consideration, thanks. Sochin Jiang On 2016/12/19 23:31, Eric Blake wrote: > On 12/19/2016 04:38 PM, sochin jiang wrote: >> Mirroring using 'top' mode without backing file specified on the target can >> be success, >> but end with a disaster. >> >> For ex

Re: [Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination

2016-12-19 Thread sochin.jiang
I got the idea, thanks, Max. Sochin.Jiang On 2016/12/19 23:31, Max Reitz wrote: > On 19.12.2016 23:38, sochin jiang wrote: >> Mirroring using 'top' mode without backing file specified on the target can >> be success, >> but end with a disaster. >> &g

[Qemu-devel] [PATCH] throttle: fix a qemu crash problem when calling blk_delete

2017-10-19 Thread sochin.jiang
From: "sochin.jiang" commit 7ca7f0 moves the throttling related part of the BDS life cycle management to BlockBackend, adds call to throttle_timers_detach_aio_context in blk_remove_bs. commit 1606e remove a block device from its throttle group in blk_delete by calling blk_io_limi

Re: [Qemu-devel] [Qemu-block] [PATCH] throttle: fix a qemu crash problem when calling blk_delete

2017-10-21 Thread sochin.jiang
oup_unregister_tgm-> throttle_timers_destroy-> *throttle_timers_detach_aio_context*->**...** sochin . On 2017/10/20 19:43, Alberto Garcia wrote: > On Sun 24 Nov 2013 04:55:52 AM CET, sochin.jiang wrote: >^^^ > I guess the date in your computer is wr