|
|
9ae3a8 |
From a9978815f1d701d0f995ec1c8a49b2a05e1fad12 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 20 Nov 2013 19:43:56 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 13/25] block: vhdx code movement - move vhdx_close() above vhdx_open()
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Message-id: <577e97e41700b11687818a8dd0169444f6c58f40.1384975172.git.jcody@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55805
|
|
|
9ae3a8 |
O-Subject: [RHEL7 qemu-kvm PATCH 13/26] block: vhdx code movement - move vhdx_close() above vhdx_open()
|
|
|
9ae3a8 |
Bugzilla: 879234
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit c46415afc2c99ea052f52f9d68ed9a78799f2c10)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/vhdx.c | 22 +++++++++++-----------
|
|
|
9ae3a8 |
1 file changed, 11 insertions(+), 11 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/vhdx.c | 22 +++++++++++-----------
|
|
|
9ae3a8 |
1 files changed, 11 insertions(+), 11 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/vhdx.c b/block/vhdx.c
|
|
|
9ae3a8 |
index 49219df..7d697e4 100644
|
|
|
9ae3a8 |
--- a/block/vhdx.c
|
|
|
9ae3a8 |
+++ b/block/vhdx.c
|
|
|
9ae3a8 |
@@ -778,6 +778,17 @@ exit:
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+static void vhdx_close(BlockDriverState *bs)
|
|
|
9ae3a8 |
+{
|
|
|
9ae3a8 |
+ BDRVVHDXState *s = bs->opaque;
|
|
|
9ae3a8 |
+ qemu_vfree(s->headers[0]);
|
|
|
9ae3a8 |
+ qemu_vfree(s->headers[1]);
|
|
|
9ae3a8 |
+ qemu_vfree(s->bat);
|
|
|
9ae3a8 |
+ qemu_vfree(s->parent_entries);
|
|
|
9ae3a8 |
+ migrate_del_blocker(s->migration_blocker);
|
|
|
9ae3a8 |
+ error_free(s->migration_blocker);
|
|
|
9ae3a8 |
+}
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
|
|
|
9ae3a8 |
Error **errp)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
@@ -1047,17 +1058,6 @@ static coroutine_fn int vhdx_co_writev(BlockDriverState *bs, int64_t sector_num,
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-static void vhdx_close(BlockDriverState *bs)
|
|
|
9ae3a8 |
-{
|
|
|
9ae3a8 |
- BDRVVHDXState *s = bs->opaque;
|
|
|
9ae3a8 |
- qemu_vfree(s->headers[0]);
|
|
|
9ae3a8 |
- qemu_vfree(s->headers[1]);
|
|
|
9ae3a8 |
- qemu_vfree(s->bat);
|
|
|
9ae3a8 |
- qemu_vfree(s->parent_entries);
|
|
|
9ae3a8 |
- migrate_del_blocker(s->migration_blocker);
|
|
|
9ae3a8 |
- error_free(s->migration_blocker);
|
|
|
9ae3a8 |
-}
|
|
|
9ae3a8 |
-
|
|
|
9ae3a8 |
static BlockDriver bdrv_vhdx = {
|
|
|
9ae3a8 |
.format_name = "vhdx",
|
|
|
9ae3a8 |
.instance_size = sizeof(BDRVVHDXState),
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|