diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-04-07 14:12:59 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-04-07 15:40:57 +0200 |
commit | 7f16476fab14fc32388e0ebae793f64673848efa (patch) | |
tree | 712f2616b235825d09dbb8e2df973e476db91c46 /block/vpc.c | |
parent | fbb92b6798894d3bf62fe3578d99fa62c720b242 (diff) | |
download | qemu-7f16476fab14fc32388e0ebae793f64673848efa.zip |
block: Fix blk->in_flight during blk_wait_while_drained()
Waiting in blk_wait_while_drained() while blk->in_flight is increased
for the current request is wrong because it will cause the drain
operation to deadlock.
This patch makes sure that blk_wait_while_drained() is called with
blk->in_flight increased exactly once for the current request, and that
it temporarily decreases the counter while it waits.
Fixes: cf3129323f900ef5ddbccbe86e4fa801e88c566e
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200407121259.21350-4-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vpc.c')
0 files changed, 0 insertions, 0 deletions