On Tue, Apr 10, 2018 at 03:25:47PM +0000, Nir Soffer wrote:
On Tue, Apr 10, 2018 at 5:50 PM Richard W.M. Jones
<rjones(a)redhat.com>
wrote:
> On Tue, Apr 10, 2018 at 02:07:33PM +0000, Nir Soffer wrote:
> > This makes sense if the device is backed by a block device on oVirt side,
> > and the NBD support efficient zeroing. But in this case the device is
> backed
> > by an empty sparse file on NFS, and oVirt does not support yet efficient
> > zeroing, we just write zeros manually.
> >
> > I think should be handled on virt-v2v plugin side. When zeroing a file
> raw
> > image,
> > you can ignore zero requests after the highest write offset, since the
> > plugin
> > created a new image, and we know that the image is empty.
> >
> > When the destination is a block device we cannot avoid zeroing since a
> block
> > device may contain junk data (we usually get dirty empty images from our
> > local
> > xtremio server).
>
> (Off topic for qemu-block but ...) We don't have enough information
> at our end to know about any of this.
>
Can't use use this logic in the oVirt plugin?
file based storage -> skip initial zeroing
block based storage -> use initial zeroing
Do you think that publishing disk capabilities in the sdk will solve this?
The plugin would have to do some complicated gymnastics. It would
have to keep track of which areas of the disk have been written and
ignore NBD_CMD_WRITE_ZEROES for other areas, except if block-based
storage is being used. And so yes we'd also need the imageio API to
publish that information to the plugin.
So it's possible but not trivial.
By the way I think we're slowly reimplementing NBD in the imageio API.
Dan Berrange pointed out earlier on that it might be easier if imageio
just exposed NBD, or if we found a way to tunnel NBD requests over web
sockets (in the format case nbdkit would not be needed, in the latter
case nbdkit could act as a bridge).
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org