diff options
author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2022-10-25 04:49:45 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-10-27 20:14:11 +0200 |
commit | e08cc001d502958040565636e19a42c06e1ae8b7 (patch) | |
tree | d775af529b1d7d598993d80c95ad1a30907d6a47 /blockjob.c | |
parent | 7e8c182fb5e5950a52623b0d463c2f1fcd15a80a (diff) |
bdrv_change_aio_context: use hash table instead of list of visited nodes
Minor performance improvement, but given that we have hash tables
available, avoid iterating in the visited nodes list every time just
to check if a node has been already visited.
The data structure is not actually a proper hash map, but an hash set,
as we are just adding nodes and not key,value pairs.
Suggested-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-4-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
0 files changed, 0 insertions, 0 deletions