]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: Make image inaccessible after failed qcow2_invalidate_cache()
authorKevin Wolf <kwolf@redhat.com>
Tue, 22 Dec 2015 15:14:10 +0000 (16:14 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Jan 2016 12:36:24 +0000 (13:36 +0100)
commit191fb11bdfbf53b33068268ce995a5c84045a8d9
treeedd46608d17d01e129d293ba4b98047c11892f4e
parent140fd5a69cf19460b8daa8a9bb83bd869f6db14d
qcow2: Make image inaccessible after failed qcow2_invalidate_cache()

If qcow2_invalidate_cache() fails, we are in a state where qcow2_close()
has already been completed, but the image hasn't been reopened yet.
Calling into any qcow2 function for an image in this state will cause
crashes.

The real solution would be to get rid of the close/open pair and instead
do an atomic reset of the involved data structures, but this isn't
trivial, so let's just make the image inaccessible for now.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/qcow2.c