]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-cache.c
qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()
authorAlberto Garcia <berto@igalia.com>
Mon, 11 May 2015 12:54:54 +0000 (15:54 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 May 2015 15:08:01 +0000 (17:08 +0200)
commitbaf07d60f5c5d5d0f0c9e844cde75691f1ceb3d1
tree795df88d7f949ffd0ccc8f93463383d3a3e6cf6f
parent72e80b89015bab196f0f0e83b12b0eee75fa0574
qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

Since all tables are now stored together, it is possible to obtain
the position of a particular table directly from its address, so the
operation becomes O(1).

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cache.c