[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] write_zeroes/trim on the whole disk
From: |
Alex Bligh |
Subject: |
Re: [Qemu-devel] write_zeroes/trim on the whole disk |
Date: |
Sat, 24 Sep 2016 17:49:24 +0100 |
> On 24 Sep 2016, at 17:42, Vladimir Sementsov-Ogievskiy <address@hidden> wrote:
>
> 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..
I think you mean 2^32-1, but yes there is no guarantee of that. In that case
you would need to break the call up into multiple calls.
However, being able to break the call up into multiple calls seems pretty
sensible given that NBD_CMD_WRITE_ZEROES may take a large amount of
time, and a REALLY long time if the server doesn't support trim.
> 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.
I don't think we should do that. We already have clear semantics that prevent
operations beyond the end of the disk. Again, just break the command up into
multipl commands. No great hardship.
--
Alex Bligh
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, (continued)
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Alex Bligh, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Alex Bligh, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Alex Bligh, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Alex Bligh, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk,
Alex Bligh <=
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Alex Bligh, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Alex Bligh, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Wouter Verhelst, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] [Nbd] write_zeroes/trim on the whole disk, Carl-Daniel Hailfinger, 2016/09/24
- Re: [Qemu-devel] [Nbd] write_zeroes/trim on the whole disk, Vladimir Sementsov-Ogievskiy, 2016/09/24
- Re: [Qemu-devel] write_zeroes/trim on the whole disk, Denis V. Lunev, 2016/09/24