On 09/10/2010 05:12 PM, Christoph Hellwig wrote:
On Fri, Sep 10, 2010 at 05:05:16PM +0300, Avi Kivity wrote:
Note that ATA allows simply ignoring TRIM requests that we can't handle,
and if we don't set the bit that guarantees TRIMed regions to be zeroed
we don't even have to zero out the regions.
It would be nice to support it. TRIM is important to recover space,
otherwise images grow and grow and there's no point in using a sparse
format in the first place.
Sure. But supporting to tiny TRIM requests doesn't make sense. That
is the same behaviour we see from real life SSDs, btw. If the request
is smaller than their erase block size or whatever internal structure
they use to track allocations it will not actually free space. On some
of the lesser quality consumer SSDs the sectors won't even be zeroed
even if they claim so in the ATA IDENTIFY response.
Okay. Let's concentrate on those UNMAP requests that seem better designed.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.