qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] vdi: Fix image opening and creation for odd dis


From: Kevin Wolf
Subject: [Qemu-devel] Re: [PATCH] vdi: Fix image opening and creation for odd disk sizes
Date: Mon, 10 May 2010 09:47:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

Am 09.05.2010 12:17, schrieb Stefan Weil:
> Kevin and you are right, and my interpretation of disk_size was wrong.
> 
> disk_size is not the size used for the blocks (then it would have to be
> large enough to keep all blocks).
> 
> disk_size is the number of bytes which are really used for data
> (so it is less or equal blocks_in_image * 1 MiB). VBoxManage
> allows creation of disk images which use the last block only partially,
> something I did not know up to now.

Ok. Makes a lot more sense this way.

> Kevin's patch is correct but still incomplete. VBoxManage can
> create images with really odd disk sizes (even sizes which are not
> a multiple of the sector size), so the checks in vdi_open
> need modifications. The current code also fails for read or write
> access beyond the last block.

Not sure what the semantics of such images is. Disk emulation should
only access complete sectors, and the qemu block layer works with
sectors, too. How does VBox implement this? Is the size rounded for the
virtual disk size? And in what direction?

Kevin




reply via email to

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