Home
last modified time | relevance | path

Searched hist:"617 f3a963589dbd54fe1f323eeac36411b352a0e" (Results 1 – 1 of 1) sorted by relevance

/qemu/tests/unit/
H A Dtest-bdrv-drain.c617f3a963589dbd54fe1f323eeac36411b352a0e Wed Dec 07 13:18:29 UTC 2022 Kevin Wolf <kwolf@redhat.com> test-bdrv-drain: Fix incorrrect drain assumptions

The test case assumes that a drain only happens in one specific place
where it drains explicitly. This assumption happened to hold true until
now, but block layer functions may drain interally (any graph
modifications are going to do that through bdrv_graph_wrlock()), so this
is incorrect. Make sure that the test code in .drained_begin only runs
where we actually want it to run.

When scheduling a BH from .drained_begin, we also need to increase the
in_flight counter to make sure that the operation is actually completed
in time before the node that it works on goes away.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221207131838.239125-10-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>