async: Register/unregister aiocontext in graph lock list
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Wed, 7 Dec 2022 13:18:24 +0000 (14:18 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 15 Dec 2022 15:07:43 +0000 (16:07 +0100)
commit587d82fae258794e33cacc9bf4ba61949184e822
tree3d80bda075264f5766c79e81cab5d3358ac87055
parent8aa77000c2ba8c234f72b9b4162529d02ea00188
async: Register/unregister aiocontext in graph lock list

Add/remove the AioContext in aio_context_list in graph-lock.c when it is
created/destroyed. This allows using the graph locking operations from
this AioContext.

In order to allow linking util/async.c with binaries that don't include
the block layer, introduce stubs for (un)register_aiocontext().

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221207131838.239125-5-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
stubs/graph-lock.c [new file with mode: 0644]
stubs/meson.build
util/async.c