On Tue, Sep 20, 2016 at 11:59:28AM +0200, Paolo Bonzini wrote:
> On 20/09/2016 11:41, Tomáš Golembiovský wrote:
> > When image is part of the file it makes sense to limit the length of the
> > image in the file. Otherwise it is assumed that the image spans to the
> > end of the file. This assumption may lead to reads/writes outside of the
> > image and thus lead to errors or data corruption.
> > 
> > To limit the assumed image size new option is introduced.
> The patch makes sense, but I think the commit message is incorrect
> because this bug is already fixed by patch 1.  Also, the option in the
> help is --device-size, not --image-size; I would just call it --size.

I don't think it makes sense as a special case in qemu-nbd.

It feels like this is better done by extending the 'raw'
block driver with 'offset' and 'length' parameters. You
can then layer the 'raw' block driver over any existing
QEMU blocker driver, anywhere in QEMU / tools that accept
a block device description. No need to add extra parameters
to any of the programs.

|: 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 :|

Reply via email to