[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/5] block: Change BlockDriverInfo.cluster_si
From: |
Stefan Hajnoczi |
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 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> ---
> 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
- [Qemu-devel] [PATCH v2 0/5] Fix conversion from ISO to VMDK streamOptimized, Fam Zheng, 2014/02/10
- [Qemu-devel] [PATCH v2 1/5] qemu-img: Convert by cluster size if target is compressed, Fam Zheng, 2014/02/10
- [Qemu-devel] [PATCH v2 2/5] vmdk: Implement .bdrv_write_compressed, Fam Zheng, 2014/02/10
- [Qemu-devel] [PATCH v2 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits, Fam Zheng, 2014/02/10
- Re: [Qemu-devel] [PATCH v2 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v2 4/5] vmdk: Implement .bdrv_get_info(), Fam Zheng, 2014/02/10
- [Qemu-devel] [PATCH v2 5/5] mirror: Check for bdrv_get_info result, Fam Zheng, 2014/02/10