From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, jcody@redhat.com, gentoo.integer@gmail.com,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits
Date: Thu, 27 Feb 2014 14:06:37 +0100 [thread overview]
Message-ID: <20140227130637.GE30387@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1392089319-25307-4-git-send-email-famz@redhat.com>
On Tue, Feb 11, 2014 at 11:28:37AM +0800, Fam Zheng wrote:
> VMDK could have big cluster_size for monolithicFlat. It implements
> .bdrv_get_info now, a 32 bit field is likely to overflow.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> include/block/block.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/block/block.h b/include/block/block.h
> index 826b5da..3eb4e54 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -14,7 +14,7 @@ typedef struct BlockJob BlockJob;
>
> typedef struct BlockDriverInfo {
> /* in bytes, 0 if irrelevant */
> - int cluster_size;
> + int64_t cluster_size;
Not sure if this commit is enough:
If the cluster size is really larger than 2 GB and a compressed image is
in use, then we will attempt 2 GB I/O. There are also other codepaths
that use cluster_size and would similarly allocate 2 GB bounce buffers!
We need to think through what happens in those cases. Should we refuse
after a certain size? Will we need to enhance some code paths to
actually split up the bounce buffers (if possible)?
Stefan
next prev parent reply other threads:[~2014-02-27 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 3:28 [Qemu-devel] [PATCH v2 0/5] Fix conversion from ISO to VMDK streamOptimized Fam Zheng
2014-02-11 3:28 ` [Qemu-devel] [PATCH v2 1/5] qemu-img: Convert by cluster size if target is compressed Fam Zheng
2014-02-11 3:28 ` [Qemu-devel] [PATCH v2 2/5] vmdk: Implement .bdrv_write_compressed Fam Zheng
2014-02-11 3:28 ` [Qemu-devel] [PATCH v2 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits Fam Zheng
2014-02-27 13:06 ` Stefan Hajnoczi [this message]
2014-02-11 3:28 ` [Qemu-devel] [PATCH v2 4/5] vmdk: Implement .bdrv_get_info() Fam Zheng
2014-02-11 3:28 ` [Qemu-devel] [PATCH v2 5/5] mirror: Check for bdrv_get_info result 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=20140227130637.GE30387@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=gentoo.integer@gmail.com \
--cc=jcody@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).