qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] write_zeroes/trim on the whole disk


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] write_zeroes/trim on the whole disk
Date: Sat, 24 Sep 2016 19:42:05 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 24.09.2016 19:31, Alex Bligh wrote:
On 24 Sep 2016, at 13:06, Vladimir Sementsov-Ogievskiy <address@hidden> wrote:

Note: if disk size is not aligned to X we will have to send request larger than 
the disk size to clear the whole disk.
If you look at the block size extension, the size of the disk must be an exact 
multiple of the minimum block size. So that would work.


But there is no guarantee that disk_size/block_size < INT_MAX.. May be, additional option, specifying the shift would be better. With convention that if offset+length exceeds disk size, length should be recalculated as disk_size-offset.

--
Best regards,
Vladimir




reply via email to

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