[Libguestfs] [PATCH v2 1/7] New APIs: cryptsetup-open and cryptsetup-close.

Richard W.M. Jones rjones at redhat.com
Thu Sep 17 10:51:15 UTC 2020


[Apologies for missing your earlier reply when I reposted the
patch series for v2]

On Thu, Sep 17, 2020 at 12:10:03PM +0200, Pino Toscano wrote:
> Regarding the deprecated functions: wouldn't it be better to have them
> in the library, rather than in the daemon? The machinery needed in the
> library is more or less than same anyway, and this way we can remove
> two RPCs in the daemon.

I'm not convinced by this - it was especially simple to add these
deprecated APIs in the daemon (just 5 lines of code), and there
doesn't seem to be any real difference, eg in performance, because you
still need to make an RPC into the daemon either way.

...
> > +If the optional C<crypttype> parameter is not present then
> > +libguestfs tries to guess the correct type (for example
> > +LUKS or BitLocker).  However you can override this by
> > +specifying one of the following types:
> > +
> > +=over 4
> > +
> > +=item C<luks>
> > +
> > +A Linux LUKS device.
> > +
> > +=item C<bitlk>
> > +
> > +A Windows BitLocker device.
> > +
> > +=back
> 
> Maybe add:
> 
>   Please refer to the L<cryptsetup(8)> documentation for all the
>   supported types.

We've been bitten in the past by deferring API contracts to external
tools.  For example I wish we'd never claimed that you can use the
part-* APIs on obscure things like Sun disk labels since it prevented
us from replacing parted.  So I would prefer that we only document the
cases we need and know we can support in future.  We can always add
things to this list later if we want.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list