diff options
| author | Stefan Hajnoczi | 2018-02-16 17:50:13 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2018-03-02 18:39:07 +0100 |
| commit | 33f2a7577787910bda161f428c904ac6a14b2454 (patch) | |
| tree | db049b4cacc288b6f3c5b7314baac4ea0ab25ffe /tests/Makefile.include | |
| parent | block: extract AIO_WAIT_WHILE() from BlockDriverState (diff) | |
| download | qemu-33f2a7577787910bda161f428c904ac6a14b2454.tar.gz qemu-33f2a7577787910bda161f428c904ac6a14b2454.tar.xz qemu-33f2a7577787910bda161f428c904ac6a14b2454.zip | |
block: add BlockBackend->in_flight counter
BlockBackend currently relies on BlockDriverState->in_flight to track
requests for blk_drain(). There is a corner case where
BlockDriverState->in_flight cannot be used though: blk->root can be NULL
when there is no medium. This results in a segfault when the NULL
pointer is dereferenced.
Introduce a BlockBackend->in_flight counter for aio requests so it works
even when blk->root == NULL.
Based on a patch by Kevin Wolf <kwolf@redhat.com>.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/Makefile.include')
0 files changed, 0 insertions, 0 deletions
