On 09/14/2011 05:44 PM, Christoph Hellwig wrote:
Map it to bdrv_discard. The server can now expose NBD_FLAG_SEND_TRIM.
Note that discard support without a way to communicate the alignment/size
requirements,
Yep, especially because alignment can be as small as 512 for sparse raw,
and as high as 65536 for qcow2...
and without the discard_zeroes_data flag is pretty much
useless.
... but right now in QEMU it is most useful with qcow2, so
!discard_zeroes_data is pretty much the best you can do.
In general, QEMU's block layer does not really do much to pass
information on discard features, which is why I didn't think much about
these bits. I'm interested in making NBD as featureful as the QEMU
block layer, but beyond that not much. :)
Still you're obviously right, I'll talk to upstream.
Paolo