On Fri, Sep 10, 2010 at 08:39:21AM -0500, Anthony Liguori wrote:
> You're hand waving to a dangerous degree here :-)
> 
> TRIM in qcow2 would require the following sequence:
> 
> 1) remove cluster from L2 table
> 2) sync()
> 3) reduce cluster reference count
> 4) sync()
> 
> TRIM needs to be fast so this is not going to be acceptable.  How do you 
> solve it?

It's utterly slow in any real life SSD.

> For QED, TRIM requires:
> 
> 1) remove cluster from L2 table
> 2) sync()
> 
> In both cases, I'm assuming we lazily write the free list and have a way 
> to detect unclean mounts.  Unclean mounts require an fsck() and both 
> qcow2 and qed require it.

If you do proper transactional metadata updates you can completely drop
the sync.  TRIM / SCSI unmap are optimizations that can just be noops
without compromising data integrity.


Reply via email to