qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] iotests: fix test case 185


From: QingFeng Hao
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] iotests: fix test case 185
Date: Tue, 27 Mar 2018 11:33:33 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0



在 2018/3/26 18:29, Kevin Wolf 写道:
Am 23.03.2018 um 04:43 hat QingFeng Hao geschrieben:
Test case 185 failed since commit 4486e89c219 --- "vl: introduce vm_shutdown()".
It's because of the newly introduced function vm_shutdown calls bdrv_drain_all,
which is called later by bdrv_close_all. bdrv_drain_all resumes the jobs
that doubles the speed and offset is doubled.
Some jobs' status are changed as well.

The fix is to not resume the jobs that are already yielded and also change
185.out accordingly.

Suggested-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: QingFeng Hao <address@hidden>

Stefan already commented on the fix itself, but I want to add two more
points:

Please change your subject line. "iotests: fix test case 185" means that
you are fixing the test case, not qemu code that makes the test case
fail. The subject line should describe the actual change. In all
likelihood it will start with "blockjob:" rather than "iotests:".
Sure! thanks for pointing that.

diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index fc645dac68..f8f208bbcf 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -99,6 +99,11 @@ typedef struct BlockJob {
      bool ready;
/**
+     * Set to true when the job is yielded.
+     */
+    bool yielded;

This is the same as !busy, so we don't need a new field for this.

Mostly yes, but the trick is that busy is set to be true in block_job_do_yield.
Kevin


--
Regards
QingFeng Hao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]