On Sat, Mar 24, 2012 at 04:29:26PM +0100, Christoph Hellwig wrote: > On Wed, Mar 14, 2012 at 01:01:35PM +0100, Kevin Wolf wrote: > > Paolo mentioned a use case as a fast way for guests to write zeros, but > > is it really faster than a normal write when we have to emulate it by a > > bdrv_write with a temporary buffer of zeros? On the other hand we have > > the cases where discard really means "I don't care about the data any > > more" and emulating it by writing zeros is just a waste of resources there. > > On raw a real discard also will destroy the preallocation, which might > absolutely kill your performance on filesystems.
This suggests that there be a new command line param to '-drive' to turn discard support on/off, since QEMU can't reliably know if the raw file it is given is intended to be fully pre-allocated by the mgmt app. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|