qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] block/vdi: Do not use bdrv_pwrite_sync() fo


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] block/vdi: Do not use bdrv_pwrite_sync() for bmap
Date: Tue, 21 Oct 2014 11:00:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 10/21/2014 02:51 AM, Max Reitz wrote:
> The bmap can be rather large (maximum blocks per image count:
> 0x3fffffff; the bmap has a size of block_count * sizeof(uint32_t) bytes,
> which makes 0xfffffffc bytes) and exceed INT_MAX. Using block layer
> functions which take a byte count as an int is therefore not a good
> idea. Use bdrv_write()+bdrv_flush() instead of bdrv_pwrite_sync().
> 
> See: https://bugzilla.redhat.com/show_bug.cgi?id=1154940
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/vdi.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]