On Wed, Jan 11, 2023 at 10:52:01AM -0500, Stefan Hajnoczi wrote:
On Wed, Jan 04, 2023 at 06:14:34PM +0000, Richard W.M. Jones wrote:
> (1) There is no way to know which properties are readable, writable,
> and those which need to be set before or after blkio_connect (see
> is_preconnect_property in the plugin). It should be possible to
> introspect this information. Also might be nice to be able read a
> list of all available properties.
libblkio doesn't support property introspection. The documentation
covers when each property can be read/written (e.g. read/write before
started and read-only after started).
Why is introspection needed?
(Answered more fully here:
https://gitlab.com/libblkio/libblkio/-/issues/56 )
> (2) It would be nice if libblkio had a way to enable debugging
and
> call the caller back for debug messages. We could then redirect the
> callbacks into the nbdkit debug API (nbdkit_debug()) where they would
> eventually end up on stderr or syslog.
>
> However don't send debug messages to stderr, or at least allow that
> behaviour to be overridden.
libblkio has no debug messages. What stderr output did you get?
So in fact I didn't see any debug. The question was just speculation
in the end. However Alberto filed this:
https://gitlab.com/libblkio/libblkio/-/issues/57
[...]
> (4b) It's unclear how completions work. If I set
min=max=1, will it
> return after the whole operation has completed? Do I need to
> call it again? What about if the request is very large, can it
> get split?
>
> Reading the example
>
https://gitlab.com/libblkio/libblkio/-/blob/main/examples/blkio-copy.c
> it appears that requests cannot ever be split?
min=max=1 blocks until exactly 1 completion occurs. BTW I checked the
documentation to see if min_completions/max_completions are covered and
I'm not sure how to improve the documentation?
There is no need to call it again if you got the completion you were
waiting for.
I guess the issue was whether a request (command?) might be split.
For example if I requested reading far more than the device could
handle in one go, would the command be rejected or would it be split
into smaller requests, and hence into several completions (maybe?). I
think the answer is that the request would be rejected, based on:
The caller must honor the constraints given by the
"max-segments",
"max-segment-len", and "max-transfer" properties. Requests are not
split.
OK.
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