[Libguestfs] [nbdkit PATCH 0/3] Fix data integrity in vddk plugin

Martin Kletzander mkletzan at redhat.com
Tue Apr 30 15:46:59 UTC 2019


On Tue, Apr 30, 2019 at 01:03:28PM +0100, Richard W.M. Jones wrote:
>I pushed 2 & 3, thanks.
>
>I'm not overjoyed about patch 1 however.  It seems to me that this is
>solved better by having two NBD connections open, one with the
>single-link=true flag and one without, and then reading extents from
>one and data from the other.  Admittedly his pushes the complexity to
>the client and prevents you using qemu-img, but it seems better
>architecturally than making an odd change to the VDDK plugin for this
>one application.
>

I actually thought of this from a more generic point of view, not just my use
case.  What VDDK exposes is really not something that is really unusable from
any point of view.  Be it qemu-img, any other client or users.  The resulting
data makes single-link=true completely unusable.  Well, unless the extent
granularity on the source block device and the file format is exactly equal to
the CHUNK_MIN_SIZE, but nobody can ever guarantee that.

I also thought of a way how to have nbdkit handle "backing chains" (it would
basically have a list of plug-ins and the first one that has data available
would be used), but that seemed too much of a hammer.  It could also be handled
by a specialized filter where the filter would provide extents from single-link
and plugin would do the rest.  But, honestly, that sounds worse to me than what
I posted in the first patch.  Maybe the filter could just take a plugin as a
parameter, e.g. "intercept extents and use this plugin for those calls", or even
generalize it to a specified list of APIs that it should intercept.

Both above approaches would need the user to explicitly specify what needs to be
done and they would really need to know how all the details fit together just to
be able to use it, even though there is a possible solve-all solution (without
which the single-link does not really has a standalone use case).

>(I'm about to post some thoughts on an NBD client, will CC you on it)
>
>Rich.
>
>-- 
>Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
>Read my programming and virtualization blog: http://rwmj.wordpress.com
>virt-builder quickly builds VMs from scratch
>http://libguestfs.org/virt-builder.1.html
>
>_______________________________________________
>Libguestfs mailing list
>Libguestfs at redhat.com
>https://www.redhat.com/mailman/listinfo/libguestfs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190430/fb6487b1/attachment.sig>


More information about the Libguestfs mailing list