On Thu, Aug 15, 2019 at 07:01:49AM -0500, Eric Blake wrote:
We still had another potential API change to squeeze into 0.9.8:
Right now, the API is overloading 'command':
nbd_connect_command/nbd_kill_command
vs.
nbd_aio_command_completed/nbd_aio_peek_command_completed
Keeping nbd_connect_command may be okay (it takes a command line to
create a subprocess), but we may want to rename nbd_kill_command to
nbd_kill_child or similar, to make it obvious that it is NOT associated
with attempting an early abort of any synchronous nbd_pread or other
commands issued to the server.
Shall we rename nbd_kill_command -> nbd_kill_subprocess? (kill_child
sounds a bit weird.)
As for the other API changes added to TODO, I think we can deal with
them by adding variants at a later date.
For example we wanted some "allow" flags for nbd_connect_uri, but
didn't really come to a conclusion about how to do that right now.
However in future we could do it by either adding
nbd_connect_uri_allow (..., allow_flags);
or (probably my preferred choice) using ELF symbol versions.
Are there other libraries apart from glibc where they are using ELF
symbol versioning to replace APIs? AIUI if done carefully it doesn't
need to lead to API breaks, because as with nbdkit we can require
callers to opt in to the new APIs by defining a symbol like
#define LIBNBD_API_VERSION 2
(As you can see, I'm keen to release a final prerelease, get fio
updated, and go for 1.0 as soon as we can.)
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