cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-block-vhdx-minor-comments-and-typo-correction.patch

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