在 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 <stefa...@gmail.com>
Signed-off-by: QingFeng Hao <ha...@linux.vnet.ibm.com>

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