]> Git Repo - qemu.git/commit
block/mirror: honor ratelimit again
authorStefan Hajnoczi <[email protected]>
Tue, 24 Apr 2018 12:35:27 +0000 (13:35 +0100)
committerJeff Cody <[email protected]>
Tue, 8 May 2018 14:47:27 +0000 (10:47 -0400)
commitddc4115efdfa6619689fe18871aa2d37890b3463
tree8b20fd813072e2969fd352dab8e6e0d42834d651
parentd01beac177d44491d7db8747b79d94e1b53d173b
block/mirror: honor ratelimit again

Commit b76e4458b1eb3c32e9824fe6aa51f67d2b251748 ("block/mirror: change
the semantic of 'force' of block-job-cancel") accidentally removed the
ratelimit in the mirror job.

Reintroduce the ratelimit but keep the block-job-cancel force=true
behavior that was added in commit
b76e4458b1eb3c32e9824fe6aa51f67d2b251748.

Note that block_job_sleep_ns() returns immediately when the job is
cancelled.  Therefore it's safe to unconditionally call
block_job_sleep_ns() - a cancelled job does not sleep.

This commit fixes the non-deterministic qemu-iotests 185 output.  The
test relies on the ratelimit to make the job sleep until the 'quit'
command is processed.  Previously the job could complete before the
'quit' command was received since there was no ratelimit.

Cc: Liang Li <[email protected]>
Cc: Jeff Cody <[email protected]>
Cc: Kevin Wolf <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-id: 20180424123527[email protected]
Signed-off-by: Jeff Cody <[email protected]>
block/mirror.c
tests/qemu-iotests/185.out
This page took 0.036465 seconds and 4 git commands to generate.