]> Git Repo - qemu.git/commit - util/aio-posix.c
aio-posix: make AioHandler deletion O(1)
authorStefan Hajnoczi <[email protected]>
Fri, 14 Feb 2020 17:17:11 +0000 (17:17 +0000)
committerStefan Hajnoczi <[email protected]>
Sat, 22 Feb 2020 08:26:47 +0000 (08:26 +0000)
commit4749079ce033a94784cbe20a661abeac598ff057
tree048fc56ddd9de5bb9fd76bdc7ecb261492495213
parent195ed8cb365edeb0d0a70a2ffdeb7a073f9a8117
aio-posix: make AioHandler deletion O(1)

It is not necessary to scan all AioHandlers for deletion.  Keep a list
of deleted handlers instead of scanning the full list of all handlers.

The AioHandler->deleted field can be dropped.  Let's check if the
handler has been inserted into the deleted list instead.  Add a new
QLIST_IS_INSERTED() API for this check.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Sergio Lopez <[email protected]>
Message-id: 20200214171712[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
include/block/aio.h
include/qemu/queue.h
util/aio-posix.c
This page took 0.026269 seconds and 4 git commands to generate.