qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v5 01/16] block: vhdx - minor comments and typo correction.
Date: Tue,  3 Sep 2013 15:53:09 -0400	[thread overview]
Message-ID: <21b0cf45803f28d5da634b697420224a0fe92a0f.1378236281.git.jcody@redhat.com> (raw)
In-Reply-To: <cover.1378236281.git.jcody@redhat.com>
In-Reply-To: <cover.1378236281.git.jcody@redhat.com>

Just a couple of minor comments to help note where allocated
buffers are freed, and a typo fix.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block/vhdx.c | 6 ++++--
 block/vhdx.h | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/block/vhdx.c b/block/vhdx.c
index e9704b1..56bc88e 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -6,9 +6,9 @@
  * Authors:
  *  Jeff Cody <jcody@redhat.com>
  *
- *  This is based on the "VHDX Format Specification v0.95", published 4/12/2012
+ *  This is based on the "VHDX Format Specification v1.00", published 8/25/2012
  *  by Microsoft:
- *      https://www.microsoft.com/en-us/download/details.aspx?id=29681
+ *      https://www.microsoft.com/en-us/download/details.aspx?id=34750
  *
  * This work is licensed under the terms of the GNU LGPL, version 2 or later.
  * See the COPYING.LIB file in the top-level directory.
@@ -262,6 +262,7 @@ static int vhdx_parse_header(BlockDriverState *bs, BDRVVHDXState *s)
     uint64_t h2_seq = 0;
     uint8_t *buffer;
 
+    /* header1 & header2 are freed in vhdx_close() */
     header1 = qemu_blockalign(bs, sizeof(VHDXHeader));
     header2 = qemu_blockalign(bs, sizeof(VHDXHeader));
 
@@ -787,6 +788,7 @@ static int vhdx_open(BlockDriverState *bs, QDict *options, int flags)
         goto fail;
     }
 
+    /* s->bat is freed in vhdx_close() */
     s->bat = qemu_blockalign(bs, s->bat_rt.length);
 
     ret = bdrv_pread(bs->file, s->bat_offset, s->bat, s->bat_rt.length);
diff --git a/block/vhdx.h b/block/vhdx.h
index fb687ed..9eb6b97 100644
--- a/block/vhdx.h
+++ b/block/vhdx.h
@@ -6,9 +6,9 @@
  * Authors:
  *  Jeff Cody <jcody@redhat.com>
  *
- *  This is based on the "VHDX Format Specification v0.95", published 4/12/2012
+ *  This is based on the "VHDX Format Specification v1.00", published 8/25/2012
  *  by Microsoft:
- *      https://www.microsoft.com/en-us/download/details.aspx?id=29681
+ *      https://www.microsoft.com/en-us/download/details.aspx?id=34750
  *
  * This work is licensed under the terms of the GNU LGPL, version 2 or later.
  * See the COPYING.LIB file in the top-level directory.
@@ -116,7 +116,7 @@ typedef struct QEMU_PACKED VHDXHeader {
                                            valid. */
     uint16_t    log_version;            /* version of the log format. Mustn't be
                                            zero, unless log_guid is also zero */
-    uint16_t    version;                /* version of th evhdx file.  Currently,
+    uint16_t    version;                /* version of the vhdx file.  Currently,
                                            only supported version is "1" */
     uint32_t    log_length;             /* length of the log.  Must be multiple
                                            of 1MB */
-- 
1.8.1.4

  reply	other threads:[~2013-09-03 19:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 19:53 [Qemu-devel] [PATCH v5 00/16] VHDX log replay and write support, .bdrv_create() Jeff Cody
2013-09-03 19:53 ` Jeff Cody [this message]
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 02/16] block: vhdx - add header update capability Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 03/16] block: vhdx code movement - VHDXMetadataEntries and BDRVVHDXState to header Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 04/16] block: vhdx - log support struct and defines Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 05/16] block: vhdx - break endian translation functions out Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 06/16] block: vhdx - update log guid in header, and first write tracker Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 07/16] block: vhdx code movement - move vhdx_close() above vhdx_open() Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 08/16] block: vhdx - log parsing, replay, and flush support Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 09/16] block: vhdx - add region overlap detection for image files Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 10/16] block: vhdx - add log write support Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 11/16] block: vhdx " Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 12/16] block: vhdx - remove BAT file offset bit shifting Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 13/16] block: vhdx - move more endian translations to vhdx-endian.c Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 14/16] block: vhdx - break out code operations to functions Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 15/16] block: vhdx - fix comment typos in header, fix incorrect struct fields Jeff Cody
2013-09-03 19:53 ` [Qemu-devel] [PATCH v5 16/16] block: vhdx - add .bdrv_create() support Jeff Cody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21b0cf45803f28d5da634b697420224a0fe92a0f.1378236281.git.jcody@redhat.com \
    --to=jcody@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).