]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qcow2: Make qcow2_write_snapshots() public
authorMax Reitz <mreitz@redhat.com>
Fri, 11 Oct 2019 15:28:03 +0000 (17:28 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 28 Oct 2019 10:53:17 +0000 (11:53 +0100)
Updating the snapshot list will be useful when upgrading a v2 image to
v3, so we will need to call this function in qcow2.c.

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

index 120cb7fa0917ab3135dac2356aef221df8cd3973..e3bf4c9776f800b73b2ca085dd11c491f2583441 100644 (file)
@@ -164,7 +164,7 @@ fail:
 }
 
 /* add at the end of the file a new list of snapshots */
-static int qcow2_write_snapshots(BlockDriverState *bs)
+int qcow2_write_snapshots(BlockDriverState *bs)
 {
     BDRVQcow2State *s = bs->opaque;
     QCowSnapshot *sn;
index 363681cfdc378e065ddfe3a42512ea67a78f6d36..6c7a23fdf6ca8daf27773218000d505d61641081 100644 (file)
@@ -716,6 +716,7 @@ int qcow2_snapshot_load_tmp(BlockDriverState *bs,
 
 void qcow2_free_snapshots(BlockDriverState *bs);
 int qcow2_read_snapshots(BlockDriverState *bs, Error **errp);
+int qcow2_write_snapshots(BlockDriverState *bs);
 
 /* qcow2-cache.c functions */
 Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables,