|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [Qemu-devel] write_zeroes/trim on the whole disk |
Date: | Sat, 24 Sep 2016 16:42:04 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 24.09.2016 15:06, Vladimir Sementsov-Ogievskiy wrote:
On 24.09.2016 00:21, Wouter Verhelst wrote:On Fri, Sep 23, 2016 at 02:00:06PM -0500, Eric Blake wrote:My preference would be a new flag to the existing commands, withexplicit documentation that 0 offset and 0 length must be used with thatflag, when requesting a full-device wipe.Alternatively, what about a flag that says "if you use this flag, the size should be left-shifted by X bits before processing"? That allows you to do TRIM or WRITE_ZEROES on much larger chunks, without being limited to "whole disk" commands. We should probably make it an illegal flag for any command that actually sends data over the wire, though.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.
which is not beautiful.. And splitting the request into two: (disk_size / X * X) and (disk_size % X) is not beautiful too. May be flag, that says 'whole disk request' is more appropriate? Nothing prevents adding then flag about X-shift.
-- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |