]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Increase BB.in_flight for coroutine and sync interfaces
authorKevin Wolf <kwolf@redhat.com>
Tue, 7 Apr 2020 12:12:58 +0000 (14:12 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Apr 2020 13:40:41 +0000 (15:40 +0200)
commitfbb92b6798894d3bf62fe3578d99fa62c720b242
tree9c9cd40658cbefed39e6a1b3d1d4de94917fde86
parent564806c529d4e0acad209b1e5b864a8886092f1f
block: Increase BB.in_flight for coroutine and sync interfaces

External callers of blk_co_*() and of the synchronous blk_*() functions
don't currently increase the BlockBackend.in_flight counter, but calls
from blk_aio_*() do, so there is an inconsistency whether the counter
has been increased or not.

This patch moves the actual operations to static functions that can
later know they will always be called with in_flight increased exactly
once, even for external callers using the blk_co_*() coroutine
interfaces.

If the public blk_co_*() interface is unused, remove it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200407121259.21350-3-kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/block-backend.c
include/sysemu/block-backend.h