From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famcool@gmail.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, hch@lst.de
Subject: Re: [Qemu-devel] [PATCH v5 12/12] BlockDriver: add bdrv_get_allocated_file_size() operation
Date: Wed, 29 Jun 2011 16:27:41 +0100 [thread overview]
Message-ID: <BANLkTik3uHLxckxjOw005uo86ac8UFwRZA@mail.gmail.com> (raw)
In-Reply-To: <1309224777-31024-13-git-send-email-famcool@gmail.com>
On Tue, Jun 28, 2011 at 2:32 AM, Fam Zheng <famcool@gmail.com> wrote:
Please use "block:" as the commit message tag instead of BlockDriver.
Usually the easiest way to find out which tag to use it by doing
git-log(1) on the main file you have modified and looking at previous
commit messages.
> +static int64_t vmdk_get_allocated_file_size(BlockDriverState *bs)
> +{
> + int i;
> + int64_t ret = 0;
> + int64_t r;
> + BDRVVmdkState *s = bs->opaque;
> +
> + ret = bdrv_get_allocated_file_size(bs->file);
> + if (ret < 0) {
> + return ret;
> + }
> + for (i = 0; i < s->num_extents; i++) {
> + r = bdrv_get_allocated_file_size(s->extents[i].file);
> + if (r < 0) {
> + return r;
> + }
> + ret += r;
> + }
> + return ret;
> +}
Does this count bs->file twice for images without a separate descriptor file?
Stefan
prev parent reply other threads:[~2011-06-29 15:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 1:32 [Qemu-devel] [PATCH v5 00/12] Adding VMDK monolithic flat support Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 01/12] VMDK: introduce VmdkExtent Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 02/12] VMDK: bugfix, align offset to cluster in get_whole_cluster Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 03/12] VMDK: probe for monolithicFlat images Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 04/12] VMDK: separate vmdk_open by format version Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 05/12] VMDK: add field BDRVVmdkState.desc_offset Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 06/12] VMDK: flush multiple extents Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 07/12] VMDK: move 'static' cid_update flag to bs field Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 08/12] VMDK: change get_cluster_offset return type Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 09/12] VMDK: open/read/write for monolithicFlat image Fam Zheng
2011-06-29 15:57 ` Stefan Hajnoczi
2011-06-30 1:57 ` Fam Zheng
2011-06-30 6:13 ` Stefan Hajnoczi
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 10/12] VMDK: create different subformats Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 11/12] VMDK: fix coding style Fam Zheng
2011-06-28 1:32 ` [Qemu-devel] [PATCH v5 12/12] BlockDriver: add bdrv_get_allocated_file_size() operation Fam Zheng
2011-06-29 15:27 ` Stefan Hajnoczi [this message]
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=BANLkTik3uHLxckxjOw005uo86ac8UFwRZA@mail.gmail.com \
--to=stefanha@gmail.com \
--cc=famcool@gmail.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).