You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/include/block
Hanna Reitz d5f8d79c2f block: Make bdrv_child_get_parent_aio_context I/O
We want to use bdrv_child_get_parent_aio_context() from
bdrv_parent_drained_{begin,end}_single(), both of which are "I/O or GS"
functions.

Prior to 3ed4f708fe, all the implementations were I/O code anyway.
3ed4f708fe has put block jobs' AioContext field under the job mutex, so
to make child_job_get_parent_aio_context() work in an I/O context, we
need to take that lock there.

Furthermore, blk_root_get_parent_aio_context() is not marked as
anything, but is safe to run in an I/O context, so mark it that way now.
(blk_get_aio_context() is an I/O code function.)

With that done, all implementations explicitly are I/O code, so we can
mark bdrv_child_get_parent_aio_context() as I/O code, too, so callers
know it is safe to run from both GS and I/O contexts.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20221107151321.211175-2-hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2 years ago
..
accounting.h block: pass OnOffAuto instead of bool to block_acct_setup() 2 years ago
aio-wait.h aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED 2 years ago
aio.h util/event-loop-base: Introduce options to set the thread pool size 3 years ago
aio_task.h block: introduce aio task pool 5 years ago
block-common.h Block layer patches 2 years ago
block-copy.h block/block-copy: block_copy(): add timeout_ns parameter 2 years ago
block-global-state.h block: Make bdrv_child_get_parent_aio_context I/O 2 years ago
block-hmp-cmds.h monitor: add missing coroutine_fn annotation 2 years ago
block-io.h block: Make bdrv_child_get_parent_aio_context I/O 2 years ago
block.h include/block/block: split header into I/O and global state API 3 years ago
block_backup.h block/backup: drop unused synchronization interface 6 years ago
block_int-common.h block: Make bdrv_child_get_parent_aio_context I/O 2 years ago
block_int-global-state.h Clean up decorations and whitespace around header guards 3 years ago
block_int-io.h block: make serializing requests functions 'void' 2 years ago
block_int.h include/block/block_int: split header into I/O and global state API 3 years ago
blockjob.h blockjob: remove unused functions 2 years ago
blockjob_int.h include/block/blockjob_int.h: split header into I/O and GS API 3 years ago
dirty-bitmap.h block/dirty-bitmap: introduce bdrv_dirty_bitmap_status() 3 years ago
export.h block/export: Move blk to BlockExport 4 years ago
fuse.h fuse: Allow exporting BDSs via FUSE 4 years ago
nbd.h nbd: remove incorrect coroutine_fn annotations 2 years ago
nvme.h nvme: Fix misleading macro when mixed with ternary operator 2 years ago
qapi.h qapi: Allow getting flat output from 'query-named-block-nodes' 5 years ago
qdict.h include: move qdict_{crumple,flatten} declarations 3 years ago
raw-aio.h linux-aio: add `dev_max_batch` parameter to laio_io_unplug() 3 years ago
replication.h replication: move include out of root directory 4 years ago
reqlist.h block/reqlist: add reqlist_wait_all() 3 years ago
snapshot.h include/block/snapshot: global state API + assertions 3 years ago
thread-pool.h util/event-loop-base: Introduce options to set the thread pool size 3 years ago
throttle-groups.h block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes 4 years ago
write-threshold.h write-threshold: deal with includes 4 years ago