Displaying 4 results from an estimated 4 matches for "nbd_unlocked_get_meta_context".
2020 Sep 29
0
[PATCH libnbd] DO NOT PUSH: Update api: Add get_nr_meta_contexts, clear_meta_contexts
...uest";
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 (i >= len) {
set_error (EINVAL, "meta context request...
2020 Sep 28
0
[libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
...--- a/lib/handle.c
+++ b/lib/handle.c
@@ -313,6 +313,38 @@ nbd_unlocked_add_meta_context (struct nbd_handle *h, const char *name)
return 0;
}
+int
+nbd_unlocked_get_nr_meta_contexts (struct nbd_handle *h)
+{
+ return nbd_internal_string_list_length (h->request_meta_contexts);
+}
+
+char *
+nbd_unlocked_get_meta_context (struct nbd_handle *h, int i)
+{
+ size_t len = nbd_internal_string_list_length (h->request_meta_contexts);
+ char *ret;
+
+ if (i < 0 || i >= len) {
+ set_error (EINVAL, "meta context request out of range");
+ return NULL;
+ }
+
+ ret = strdup (h->request_meta_cont...
2020 Oct 27
6
[PATCH libnbd 0/5] info: --map: Coalesce adjacent extents of the same type.
This adds coalescing of adjacent extents of the same type, as
mentioned by Eric Blake in the commit message here:
https://github.com/libguestfs/libnbd/commit/46072f6611f80245846a445766da071e457b00cd
The patch series is rather long because it detours through adding the
<vector.h> library from nbdkit into libnbd and replacing ad hoc uses
of realloc, char ** etc in various places.
Rich.
2020 Sep 28
8
[libnbd PATCH 0/3] opt_list_meta_context
I'm posting this now, as I'm at the end of a workday and I got things
working for manual experimentation.
Still 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