Here are few things I found out when using libnbd that might be perfectly fine
or maybe just an oversight, but I wanted to point them out. It's nothing major.
When running a program with `nbdkit -U - --run ...`, the $nbd parameter gets
expanded to nbd:unix:/path/to/socket. When this string is passed to
nbd_connect_uri(), it does not return an error (even though it is not a valid
URL), but what's more it treats it as "nbd://localhost", which might be a
completely different server (that actually happened to me and it was kind of confusing).
When nbd_block_status() callback returns -1, the nbd_block_status() function
reports:
command failed: Protocol error (errno = 71)
which is a bit confusing to me. I could be nicer to have that report that it
really was the callback that caused this.
One last thing is that I could not find any definition for the flags of
"base:allocation" metadata (NBD_STATE_HOLE and NBD_STATE_ZERO). It might just
be things that are still missing due to an early stage of libnbd, or it might
not belong there or it might be me misusing something.
Have a nice day,
Martin