[Libguestfs] [PATCH libnbd 3/4] api: Add nbd_connect_socket.

Richard W.M. Jones rjones at redhat.com
Fri Oct 4 20:33:22 UTC 2019


On Fri, Oct 04, 2019 at 03:08:15PM -0500, Eric Blake wrote:
> Do we want a mode where we can hand a socket to libnbd that has
> already completed handshake phase and is immediately ready for
> transaction phase?  I've seen posts describing alternative programs
> that do their own handshake before using ioctls to hand an open
> socket to the kernel kvm module, which only needs to know the size

nbd :-?

> and flags associated with the socket, to proceed to use it without
> further negotiation.  Having such a mode would allow libnbd instead
> of the kernel ioctl to be used in the same manner.  But having that
> as a separate API rather than trying to cram it into this one is
> fine.  (And same counterpart question for nbdkit: do we want a mode
> where nbdkit can be handed an already-open socket and details about
> what flags the client side has been told, and skip handshake
> straight into serving client transaction requests)

I understand this may be necessary for the kernel module.  If we can
be sure it really has a use-case [nbd-runner?] then yes.

> Series looks great to me.

It makes the fuzzer run about 10% faster (because of faster
execs/sec), so it's not a huge win but definitely worth it I think.

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




More information about the Libguestfs mailing list