From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
Feiran Zheng <feiran.zheng@emc.com>
Subject: Re: [Qemu-devel] [PATCH 2/5] vmdk: add support for “zeroed‐grain” GTE
Date: Fri, 19 Apr 2013 10:59:04 +0200 [thread overview]
Message-ID: <20130419085904.GA28732@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1366343325-5252-3-git-send-email-famz@redhat.com>
On Fri, Apr 19, 2013 at 11:48:42AM +0800, Fam Zheng wrote:
> diff --git a/block/vmdk.c b/block/vmdk.c
> index 450a721..5e60940 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -33,10 +33,13 @@
> #define VMDK4_MAGIC (('K' << 24) | ('D' << 16) | ('M' << 8) | 'V')
> #define VMDK4_COMPRESSION_DEFLATE 1
> #define VMDK4_FLAG_RGD (1 << 1)
> +/* Zeroed-grain enable bit */
> +#define VMDK4_FLAG_ZG (1 << 2)
Please use a clear name like VMDK4_FLAG_ZERO_GRAIN.
> @@ -81,6 +84,8 @@ typedef struct VmdkExtent {
> bool flat;
> bool compressed;
> bool has_marker;
> + bool has_zero_grain;
> + int version;
uint32_t according to the spec. Please use fixed-size integer types
instead of int, long, etc which can change depending on the host
architecture.
> @@ -1181,7 +1193,7 @@ static int vmdk_write(BlockDriverState *bs, int64_t sector_num,
> sector_num << 9, !extent->compressed,
> &cluster_offset);
> if (extent->compressed) {
> - if (ret == 0) {
> + if (ret == VMDK_OK) {
Should this be squashed into the previous patch?
next prev parent reply other threads:[~2013-04-19 8:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 3:48 [Qemu-devel] [PATCH 0/5] vmdk: zeroed-grain GTE support Fam Zheng
2013-04-19 3:48 ` [Qemu-devel] [PATCH 1/5] vmdk: named return code Fam Zheng
2013-04-19 3:48 ` [Qemu-devel] [PATCH 2/5] vmdk: add support for “zeroed‐grain” GTE Fam Zheng
2013-04-19 8:59 ` Stefan Hajnoczi [this message]
2013-04-19 9:10 ` Fam Zheng
2013-04-19 11:22 ` Stefan Hajnoczi
2013-04-19 3:48 ` [Qemu-devel] [PATCH 3/5] vmdk: Add option to create zeroed-grain image Fam Zheng
2013-04-19 9:05 ` Stefan Hajnoczi
2013-04-19 3:48 ` [Qemu-devel] [PATCH 4/5] vmdk: change magic number to macro Fam Zheng
2013-04-19 9:06 ` Stefan Hajnoczi
2013-04-19 3:48 ` [Qemu-devel] [PATCH 5/5] vmdk: add bdrv_co_write_zeroes Fam Zheng
2013-04-19 9:12 ` Stefan Hajnoczi
2013-04-19 11:04 ` Fam Zheng
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=20130419085904.GA28732@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=feiran.zheng@emc.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).