|
|
0a122b |
From 59e64d4b4ebda3ec50e4f962f44fb31d5ff5fa86 Mon Sep 17 00:00:00 2001
|
|
|
0a122b |
From: Jeffrey Cody <jcody@redhat.com>
|
|
|
0a122b |
Date: Wed, 20 Nov 2013 19:43:50 +0100
|
|
|
0a122b |
Subject: [PATCH 07/25] block: vhdx - minor comments and typo correction.
|
|
|
0a122b |
|
|
|
0a122b |
RH-Author: Jeffrey Cody <jcody@redhat.com>
|
|
|
0a122b |
Message-id: <132355fbfb44520bc218abfdd3e67f9a18201cf6.1384975172.git.jcody@redhat.com>
|
|
|
0a122b |
Patchwork-id: 55800
|
|
|
0a122b |
O-Subject: [RHEL7 qemu-kvm PATCH 07/26] block: vhdx - minor comments and typo correction.
|
|
|
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 |
Just a couple of minor comments to help note where allocated
|
|
|
0a122b |
buffers are freed, and a typo fix.
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
|
|
0a122b |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
0a122b |
(cherry picked from commit 6e9d290bf62406098ca3d7bf3796463681ed3c39)
|
|
|
0a122b |
---
|
|
|
0a122b |
block/vhdx.c | 6 ++++--
|
|
|
0a122b |
block/vhdx.h | 6 +++---
|
|
|
0a122b |
2 files changed, 7 insertions(+), 5 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
block/vhdx.c | 6 ++++--
|
|
|
0a122b |
block/vhdx.h | 6 +++---
|
|
|
0a122b |
2 files changed, 7 insertions(+), 5 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
diff --git a/block/vhdx.c b/block/vhdx.c
|
|
|
0a122b |
index 41c3065..23be4e3 100644
|
|
|
0a122b |
--- a/block/vhdx.c
|
|
|
0a122b |
+++ b/block/vhdx.c
|
|
|
0a122b |
@@ -6,9 +6,9 @@
|
|
|
0a122b |
* Authors:
|
|
|
0a122b |
* Jeff Cody <jcody@redhat.com>
|
|
|
0a122b |
*
|
|
|
0a122b |
- * This is based on the "VHDX Format Specification v0.95", published 4/12/2012
|
|
|
0a122b |
+ * This is based on the "VHDX Format Specification v1.00", published 8/25/2012
|
|
|
0a122b |
* by Microsoft:
|
|
|
0a122b |
- * https://www.microsoft.com/en-us/download/details.aspx?id=29681
|
|
|
0a122b |
+ * https://www.microsoft.com/en-us/download/details.aspx?id=34750
|
|
|
0a122b |
*
|
|
|
0a122b |
* This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
|
|
0a122b |
* See the COPYING.LIB file in the top-level directory.
|
|
|
0a122b |
@@ -264,6 +264,7 @@ static int vhdx_parse_header(BlockDriverState *bs, BDRVVHDXState *s)
|
|
|
0a122b |
uint64_t h2_seq = 0;
|
|
|
0a122b |
uint8_t *buffer;
|
|
|
0a122b |
|
|
|
0a122b |
+ /* header1 & header2 are freed in vhdx_close() */
|
|
|
0a122b |
header1 = qemu_blockalign(bs, sizeof(VHDXHeader));
|
|
|
0a122b |
header2 = qemu_blockalign(bs, sizeof(VHDXHeader));
|
|
|
0a122b |
|
|
|
0a122b |
@@ -790,6 +791,7 @@ static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
|
|
|
0a122b |
goto fail;
|
|
|
0a122b |
}
|
|
|
0a122b |
|
|
|
0a122b |
+ /* s->bat is freed in vhdx_close() */
|
|
|
0a122b |
s->bat = qemu_blockalign(bs, s->bat_rt.length);
|
|
|
0a122b |
|
|
|
0a122b |
ret = bdrv_pread(bs->file, s->bat_offset, s->bat, s->bat_rt.length);
|
|
|
0a122b |
diff --git a/block/vhdx.h b/block/vhdx.h
|
|
|
0a122b |
index c3b64c6..1dbb320 100644
|
|
|
0a122b |
--- a/block/vhdx.h
|
|
|
0a122b |
+++ b/block/vhdx.h
|
|
|
0a122b |
@@ -6,9 +6,9 @@
|
|
|
0a122b |
* Authors:
|
|
|
0a122b |
* Jeff Cody <jcody@redhat.com>
|
|
|
0a122b |
*
|
|
|
0a122b |
- * This is based on the "VHDX Format Specification v0.95", published 4/12/2012
|
|
|
0a122b |
+ * This is based on the "VHDX Format Specification v1.00", published 8/25/2012
|
|
|
0a122b |
* by Microsoft:
|
|
|
0a122b |
- * https://www.microsoft.com/en-us/download/details.aspx?id=29681
|
|
|
0a122b |
+ * https://www.microsoft.com/en-us/download/details.aspx?id=34750
|
|
|
0a122b |
*
|
|
|
0a122b |
* This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
|
|
0a122b |
* See the COPYING.LIB file in the top-level directory.
|
|
|
0a122b |
@@ -116,7 +116,7 @@ typedef struct QEMU_PACKED VHDXHeader {
|
|
|
0a122b |
valid. */
|
|
|
0a122b |
uint16_t log_version; /* version of the log format. Mustn't be
|
|
|
0a122b |
zero, unless log_guid is also zero */
|
|
|
0a122b |
- uint16_t version; /* version of th evhdx file. Currently,
|
|
|
0a122b |
+ uint16_t version; /* version of the vhdx file. Currently,
|
|
|
0a122b |
only supported version is "1" */
|
|
|
0a122b |
uint32_t log_length; /* length of the log. Must be multiple
|
|
|
0a122b |
of 1MB */
|
|
|
0a122b |
--
|
|
|
0a122b |
1.7.1
|
|
|
0a122b |
|