On Thu, Sep 01, 2011 at 04:05:26PM +0200, Christoph Hellwig wrote: > On Thu, Sep 01, 2011 at 02:27:55PM +0100, Daniel P. Berrange wrote: > > I see two likely approaches: > > > > 1. Add a parameter to the existing 'block_resize' command > > 'refreshonly=true|false' > > > > 2. Add a separate command 'block_refresh' > > I think all that you need is a to implement a bdrv_truncate method > for host devices that simply checks if the new size smaller or equal > to the device size, and return 0 in that case or an error otherwise.
Hmm, yes that is another option. I'll see if I can cook up a patch for doing that. 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 :|