[Libguestfs] [PATCH 0/3] Add discard support.

Richard W.M. Jones rjones at redhat.com
Mon Mar 10 17:28:51 UTC 2014


These patches contain the beginnings of discard (a.k.a. trim or unmap)
support.  This will allow us to change virt-sparsify to work on disk
images in-place (instead of using slow & inefficient copying).

The approach used is to add an optional 'discard' parameter to
add-drive.  It has 3 possible settings:

 - 'disable' : the default, no discard is done
 - 'besteffort' : try to enable it, but don't fail if it's not supported
 - 'enable' : enable it, and fail if it is not supported

I'm not sure if we should wait for post-1.26 before adding discard
support.  It depends if the interface above is suitable or if we'll
have to change it later.  However I discussed how to support this at
DevConf and this approach was generally agreed.

Rich.





More information about the Libguestfs mailing list