summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2013-10-30 10:44:44 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2013-11-07 13:58:58 +0100
commitc46415afc2c99ea052f52f9d68ed9a78799f2c10 (patch)
treeafc4c0174b46dc9dc86554e90c53aaf57a9859c0 /block
parentc3906c5e8281b37a526c706596af8575d6ac00d3 (diff)
downloadqemu-c46415afc2c99ea052f52f9d68ed9a78799f2c10.tar.gz
block: vhdx code movement - move vhdx_close() above vhdx_open()
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/vhdx.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/block/vhdx.c b/block/vhdx.c
index 241703a1ad..3f06ce33ef 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -778,6 +778,17 @@ exit:
}
+static void vhdx_close(BlockDriverState *bs)
+{
+ BDRVVHDXState *s = bs->opaque;
+ qemu_vfree(s->headers[0]);
+ qemu_vfree(s->headers[1]);
+ qemu_vfree(s->bat);
+ qemu_vfree(s->parent_entries);
+ migrate_del_blocker(s->migration_blocker);
+ error_free(s->migration_blocker);
+}
+
static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
@@ -1035,17 +1046,6 @@ static coroutine_fn int vhdx_co_writev(BlockDriverState *bs, int64_t sector_num,
}
-static void vhdx_close(BlockDriverState *bs)
-{
- BDRVVHDXState *s = bs->opaque;
- qemu_vfree(s->headers[0]);
- qemu_vfree(s->headers[1]);
- qemu_vfree(s->bat);
- qemu_vfree(s->parent_entries);
- migrate_del_blocker(s->migration_blocker);
- error_free(s->migration_blocker);
-}
-
static BlockDriver bdrv_vhdx = {
.format_name = "vhdx",
.instance_size = sizeof(BDRVVHDXState),