Skip to content

vl: Drain before (block) job cancel when quitting

Max Reitz qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2vl: Drain before (block) job cancel when quittingvl.c+11 -04 replies
2/2iotests: Test quitting with job on throttled nodetests/qemu-iotests/218 tests/qemu-iotests/218.out+57 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] vl: Drain before (block) job cancel when quitting

Quitting qemu should lead to qemu exiting pretty much immediately. That means if you have a block job running on a throttled block node, the node should ignore its throttling and the job should be cancelled immediately.

Unfortunately, that is not what happens. Currently, the node will be drained (with a bdrv_drain_all()), and then again unquiesced (because bdrv_drain_all() ends). Then, the block job is cancelled; but at this point, the node is no longer drained, so it will block, as it befits a throttling node.

To fix this issue, we have to keep all nodes drained while we cancel all block jobs when quitting qemu. This will make the throttle node ignore its throttling and thus let the block job cancel immediately.

Max Reitz (2):
vl: Drain before (block) job cancel when quitting
iotests: Test quitting with job on throttled node

 vl.c                       | 11 ++++++++
 tests/qemu-iotests/218     | 55 ++++++++++++++++++++++++++++++++++++--
 tests/qemu-iotests/218.out |  4 +++
 3 files changed, 68 insertions(+), 2 deletions(-)
Signature · 1 line
2.21.0