Displaying 7 results from an estimated 7 matches for "get_nr_meta_contexts".
2020 Sep 29
2
Re: [libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
On Mon, Sep 28, 2020 at 05:05:16PM -0500, Eric Blake wrote:
> + "get_meta_context", {
> + default_call with
> + args = [ Int "i" ]; ret = RString;
Previously we have only used the Int parameter type for things which
are plausibly integers (timeouts, signal numbers). This one really
ought to be an unsigned or better still a size_t. Would it help if I
provided
2020 Sep 28
0
[libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
...ks of data are allocated, zero or sparse).
This call adds one metadata context to the list to be negotiated.
You can call it as many times as needed. The list is initially
-empty when the handle is created.
+empty when the handle is created; you can check the contents of
+the list with L<nbd_get_nr_meta_contexts(3)> and
+L<nbd_get_meta_context(3)>, or clear it with
+L<nbd_clear_meta_contexts(3)>.
The NBD protocol limits meta context names to 4096 bytes, but
servers may not support the full length. The encoding of meta
@@ -991,9 +994,73 @@ C<LIBNBD_CONTEXT_> for some well-known cont...
2020 Sep 29
0
Re: [libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
...for things which
> are plausibly integers (timeouts, signal numbers). This one really
> ought to be an unsigned or better still a size_t. Would it help if I
> provided a SizeT type for the generator?
If we take SizeT as parameter for this one, we probably want to return
an ssize_t for get_nr_meta_contexts, rather than RInt. Does the name
RSizeT that returns ssize_t make sense?
>
> But in general yes this patch is obvious so ACK.
>
> Rich.
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
2020 Sep 29
0
[PATCH libnbd] DO NOT PUSH: Update api: Add get_nr_meta_contexts, clear_meta_contexts
...shortdesc = "return the i'th meta context request";
longdesc = "\
During connection libnbd can negotiate zero or more metadata
diff --git a/lib/handle.c b/lib/handle.c
index e0047b7..7adc6d1 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -320,12 +320,12 @@ nbd_unlocked_get_nr_meta_contexts (struct nbd_handle *h)
}
char *
-nbd_unlocked_get_meta_context (struct nbd_handle *h, int i)
+nbd_unlocked_get_meta_context (struct nbd_handle *h, size_t i)
{
size_t len = nbd_internal_string_list_length (h->request_meta_contexts);
char *ret;
- if (i < 0 || i >= len) {
+ if...
2020 Sep 28
8
[libnbd PATCH 0/3] opt_list_meta_context
...till to do:
- write interop tests for qemu-nbd and nbdkit (including my proposed
patch addition of qemu-nbd -A to show qemu:allocation-depth)
- figure out if we can make 'nbdinfo --map' use the new API to
automatically select all contexts advertised by the server
Eric Blake (3):
api: Add get_nr_meta_contexts, clear_meta_contexts
generator: Rename OPT_SET_META_CONTEXT states
api: Add nbd_opt_list_meta_context
lib/internal.h | 1 +
generator/API.ml | 162 +++++++++++++++++-
generator/Makefile.am | 4 +-
generato...
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a
lot of testsuite coverage as well as putting the new API to use in
nbdinfo.
Eric Blake (2):
api: Add nbd_opt_list_meta_context
info: List available meta-contexts
lib/internal.h | 1 +
generator/API.ml | 84 ++++++++-
2020 Sep 28
0
[libnbd PATCH 3/3] api: Add nbd_opt_list_meta_context
...;
+ see_also = [Link "set_opt_mode"; Link "opt_list_meta_context"];
+ };
+
"aio_pread", {
default_call with
args = [ BytesPersistOut ("buf", "count"); UInt64 "offset" ];
@@ -2884,6 +2962,8 @@ let first_version = [
"get_nr_meta_contexts", (1, 6);
"get_meta_context", (1, 6);
"clear_meta_contexts", (1, 6);
+ "opt_list_meta_context", (1, 6);
+ "aio_opt_list_meta_context", (1, 6);
(* These calls are proposed for a future version of libnbd, but
* have not been added to any re...