]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: Separate qcow2_check_read_snapshot_table()
authorMax Reitz <mreitz@redhat.com>
Fri, 11 Oct 2019 15:28:06 +0000 (17:28 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 28 Oct 2019 10:54:00 +0000 (11:54 +0100)
commit8bc584fe035d98b8aca4fcc818617c91df0ed925
treef88aa3e4d673fce26ed685a6a9eca498527928e7
parent0a85af351d90e1ae9e06b3bb5290ddf2d5d8b950
qcow2: Separate qcow2_check_read_snapshot_table()

Reading the snapshot table can fail.  That is a problem when we want to
repair the image.

Therefore, stop reading the snapshot table in qcow2_do_open() in check
mode.  Instead, add a new function qcow2_check_read_snapshot_table()
that reads the snapshot table at a later point.  In the future, we want
to handle errors here and fix them.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20191011152814.14791-9-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-snapshot.c
block/qcow2.c
block/qcow2.h