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.