diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-12-05 12:52:09 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-12-22 15:03:41 +0100 |
commit | db0289b9b26cb653d5662f5d6a2a52d70243cd56 (patch) | |
tree | f220f507d3728894757c187331f022dee7a89df5 /qtest.c | |
parent | bff5554843773d8ca644fddd37ffebcc952ce48f (diff) |
block: Make bdrv_drain_invoke() recursive
This change separates bdrv_drain_invoke(), which calls the BlockDriver
drain callbacks, from bdrv_drain_recurse(). Instead, the function
performs its own recursion now.
One reason for this is that bdrv_drain_recurse() can be called multiple
times by bdrv_drain_all_begin(), but the callbacks may only be called
once. The separation is necessary to fix this bug.
The other reason is that we intend to go to a model where we call all
driver callbacks first, and only then start polling. This is not fully
achieved yet with this patch, as bdrv_drain_invoke() contains a
BDRV_POLL_WHILE() loop for the block driver callbacks, which can still
call callbacks for any unrelated event. It's a step in this direction
anyway.
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qtest.c')
0 files changed, 0 insertions, 0 deletions