On 17/01/2018 01:53, Liu, Changpeng wrote: >> Second, virtio-based vhost-user remains QEMU's preferred method for >> high-performance I/O in guests. Discard support is missing and that is >> important for SSDs; that should be fixed in the virtio spec. Are there > Previously I have a patch adding DISCARD support to virtio-blk, but I didn't > find > the way using svn to update the spec patch, any git repository I can use > to update the virtio-blk spec ? I think I can pick up the feature again.
There is https://github.com/oasis-tcs/virtio-spec. You should add support for all of: 1) a command that can do WRITE ZERO, WRITE ZERO with discard, and advisory DISCARD of a range of blocks. The command must be controlled by a new feature bit. 2) a configuration space element for discard granularity, controlled by the same feature bit as (1) 3) a feature bit that is 1 if WRITE ZERO with discard can actually discard parts that are aligned to the granularity Thanks, Paolo