cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-block-vhdx-code-movement-move-vhdx_close-above-vhdx_.patch

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