I was working on this piece of code today:
https://github.com/libguestfs/libguestfs/blob/3fb35e66272ab675bb335a7ae1b...
which reminded me of this email thread. The above function in
libguestfs encodes which versions of qemu and which block drivers in
qemu have discard support.
Unfortunately it doesn't encode the NFS knowledge nor the local
drive/partition business, because it's rather hard to detect those.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org