search for: opt_list

Displaying 20 results from an estimated 21 matches for "opt_list".

2020 Aug 18
3
[libnbd PATCH v3 0/2] Implementing NBD_OPT_LIST
This is a subset of my v2 posting, but limited to just the NBD_OPT_LIST handling. The biggest change since v2 is the addition of added unit testing in all four language bindings (C, python, ocaml, golang). The tests require nbdkit built from git on PATH, and may not be entirely idiomatic, but I at least validated that they catch issues (for example, adding an exit sta...
2020 Aug 18
0
[libnbd PATCH v3 2/2] api: Add nbd_aio_opt_list
This continues the changes for adding NBD_OPT_LIST support. Now, instead of libnbd malloc'ing storage itself, the user passes a callback that can handle name/description pairs however it likes, and we get rid of the artificial cap at 10000 exports. However, the user will probably end up malloc'ing a list themselves, as we can't call n...
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...a26a79 100644 --- a/generator/state_machine.ml +++ b/generator/state_machine.ml @@ -273,6 +273,7 @@ and newstyle_state_machine = [ * state needs to run and skip to the next state in the list if not. *) Group ("OPT_STARTTLS", newstyle_opt_starttls_state_machine); + Group ("OPT_LIST", newstyle_opt_list_state_machine); Group ("OPT_STRUCTURED_REPLY", newstyle_opt_structured_reply_state_machine); Group ("OPT_SET_META_CONTEXT", newstyle_opt_set_meta_context_state_machine); Group ("OPT_GO", newstyle_opt_go_state_machine); @@ -341,6 +342,4...
2020 Jul 20
2
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
Proposal for new APIs to list exports. The general shape of the API can probably best be seen from the examples/list-exports.c example. Rich.
2020 Aug 14
0
[libnbd PATCH v2 11/13] api: Add nbd_aio_opt_list
This continues the changes for adding NBD_OPT_LIST support. Now, instead of libnbd malloc'ing storage itself, the user passes a callback that can handle name/description pairs however it likes, and we get rid of the artificial cap at 10000 exports. However, the user will probably end up malloc'ing a list themselves, as we can't call n...
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
...ing for new state api: Permit several existing API in Negotiating state api: Add nbd_set_opt_mode api: Add nbd_opt_abort and nbd_aio_opt_abort api: Add nbd_opt_go and nbd_aio_opt_go examples: Update list-exports to demonstrate nbd_opt_go info: Simplify by using nbd_opt_go api: Add nbd_opt_list api: Add nbd_aio_opt_list wip: api: Give aio_opt_go a completion callback wip: api: add nbd_opt_info, nbd_aio_opt_info docs/libnbd.pod | 42 +- lib/internal.h | 45 +- lib/nbd-protocol.h | 10 +- gene...
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...o code with. > +++ b/generator/state_machine.ml > @@ -273,6 +273,7 @@ and newstyle_state_machine = [ > * state needs to run and skip to the next state in the list if not. > *) > Group ("OPT_STARTTLS", newstyle_opt_starttls_state_machine); > + Group ("OPT_LIST", newstyle_opt_list_state_machine); > Group ("OPT_STRUCTURED_REPLY", newstyle_opt_structured_reply_state_machine); > Group ("OPT_SET_META_CONTEXT", newstyle_opt_set_meta_context_state_machine); > Group ("OPT_GO", newstyle_opt_go_state_machine)...
2020 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good testsuite coverage and demonstrable performance improvement to nbdinfo, I'm going ahead and pushing this now. We may still want to add further nbd_opt_* commands for other fine-grained tuning of negotiation, but for now, I think things have stabilized on this end, and I can return to polishing .list_exports on the nbdkit
2020 Jul 20
0
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...field we are ignoring (some sort of description - not sure what servers actually set it), and there's scope for more fields in future. With the current API we can add more fields in future. > >+++ b/generator/states-newstyle-opt-list.c > > >+STATE_MACHINE { > >+ NEWSTYLE.OPT_LIST.START: > >+ if (!h->list_exports) { > >+ SET_NEXT_STATE (%^OPT_STRUCTURED_REPLY.START); > >+ return 0; > >+ } > >+ > >+ h->sbuf.option.version = htobe64 (NBD_NEW_VERSION); > >+ h->sbuf.option.option = htobe32 (NBD_OPT_LIST); > >+ h...
2020 Sep 28
0
[libnbd PATCH 2/3] generator: Rename OPT_SET_META_CONTEXT states
Drop the SET designation, so that we can reuse these states for OPT_LIST_META_CONTEXT in the next patch. --- generator/Makefile.am | 4 +-- generator/state_machine.ml | 6 ++--- ...t.c => states-newstyle-opt-meta-context.c} | 26 +++++++++---------- .../states-newstyle-opt-structured-reply.c | 4 +-- generator/states-...
2011 Mar 31
5
manage /etc/passwd and /etc/group
Hi again, I am trying to add the following to my /etc/passwd and /etc/group files +::::: and +::: this is for ldap search on the servers. I am note quite sure on howto do this, I tryed with the following code augeas{ "groups ldap": context => "/files/etc/group", changes => [
2020 Sep 21
0
[nbdkit PATCH v3 06/14] api: Add .export_description
...a client will request name and description during NBD_OPT_GO; adding this functionality in nbdkit makes it easier to test that API in libnbd. Also note that 'nbdinfo --list' released with libnbd 1.4 does NOT query descriptions during NBD_OPT_INFO (it assumes that the description during NBD_OPT_LIST is sufficient); but later libnbd does as a fallback for when the list description is empty, making it trickier to write a test that passes across libnbd versions. --- docs/nbdkit-filter.pod | 9 ++++ docs/nbdkit-plugin.pod | 20 ++++++++ docs/nbdkit-protocol.pod...
2020 Sep 28
8
[libnbd PATCH 0/3] opt_list_meta_context
...bd -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 +- generator/state_machine.ml | 6 +- ...t.c => states-newstyle-opt-meta-context...
2020 Sep 07
0
[libnbd PATCH 2/2] generator: Free closures on failure
...(struct nbd_handle *h, nbd_unlocked_clear_debug_callback (h); h->debug_callback = *debug_callback; + SET_CALLBACK_TO_NULL (*debug_callback); return 0; } diff --git a/lib/opt.c b/lib/opt.c index 003ecf8..6ea8326 100644 --- a/lib/opt.c +++ b/lib/opt.c @@ -156,6 +156,7 @@ nbd_unlocked_opt_list (struct nbd_handle *h, nbd_list_callback *list) if (nbd_unlocked_aio_opt_list (h, &l, &c) == -1) return -1; + SET_CALLBACK_TO_NULL (*list); if (wait_for_option (h) == -1) return -1; if (s.err) { @@ -172,6 +173,7 @@ nbd_unlocked_aio_opt_go (struct nbd_handle *h, { h-...
2020 Sep 28
0
[libnbd PATCH 3/3] api: Add nbd_opt_list_meta_context
...-852,7 +857,7 @@ to end the connection without finishing negotiation."; example = Some "examples/list-exports.c"; see_also = [Link "get_opt_mode"; Link "aio_is_negotiating"; Link "opt_abort"; Link "opt_go"; Link "opt_list"; - Link "opt_info"]; + Link "opt_info"; Link "opt_list_meta_context"]; }; "get_opt_mode", { @@ -960,6 +965,56 @@ corresponding L<nbd_opt_go(3)> would succeed."; Link "set_export_name&...
2020 Sep 07
4
[libnbd PATCH 0/2] Fix memory leak with closures
As promised in my earlier thread on libnbd completion callback question. Eric Blake (2): generator: Refactor handling of closures in unlocked functions generator: Free closures on failure docs/libnbd.pod | 2 +- generator/C.ml | 48 +++++++++++------ generator/C.mli | 1 + lib/debug.c | 7 +-- lib/opt.c | 31 ++++++-----
2020 Aug 14
0
[libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
...state needs to run and skip to the next state in the list if not. + * When opt_mode is set, control is returned to the user in state + * NEGOTIATING after OPT_STRUCTURED_REPLY or any failed OPT_GO. *) Group ("OPT_STARTTLS", newstyle_opt_starttls_state_machine); Group ("OPT_LIST", newstyle_opt_list_state_machine); @@ -286,6 +288,30 @@ and newstyle_state_machine = [ Group ("OPT_GO", newstyle_opt_go_state_machine); Group ("OPT_EXPORT_NAME", newstyle_opt_export_name_state_machine); + (* When NBD_OPT_GO fails, or when opt_mode is enabled, optio...
2020 Aug 27
10
[nbdkit PATCH v2 0/8] exportname filter
This is a revision of my .default_export work, plus new work on .export_descriptions and a new exportname filter. I think it is now ready to check in. Things I'd still like in 1.22: - the file plugin should implement .list_exports (patch already posted, but it needs rebasing on this series) - the ext2 filter should override .list_exports when in exportname mode - the nbd plugin should be
2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...a failed NBD_OPT_GO can now be recovered from (such as attempting to set a different export name). The list-exports example is updated to use the new API, in order to demonstrate that it is now possible to do everything with just one nbd handle. The idea is that future patches will rework the NBD_OPT_LIST code to instead be under the control of the user that enables opt mode, probably with a callback function rather than malloc'ing the list in the handle. In fact, by making TLS negotiating (when tls=1) optional, libnbd can be used to test 'nbdkit --tls=on' as both a plaintext and encryp...
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 ++++++++- generator/states-newstyle-opt-meta-context.c | 83 +++++++-- generator/states-newstyle.c | 3 + lib/opt.c...