search for: nr_exports

Displaying 12 results from an estimated 12 matches for "nr_exports".

2020 Aug 14
0
[libnbd PATCH v2 11/13] api: Add nbd_aio_opt_list
...}; + struct nbd_handle { /* Unique name assigned to this handle for debug messages * (to avoid having to print actual pointers). @@ -102,10 +111,7 @@ struct nbd_handle { /* Option negotiation mode. */ bool opt_mode; uint8_t current_opt; - - /* Results of nbd_opt_list. */ - size_t nr_exports; - struct export *exports; + struct command_cb opt_cb; /* Full info mode. */ bool full_info; @@ -186,7 +192,7 @@ struct nbd_handle { union { struct { struct nbd_fixed_new_option_reply_server server; - char str[NBD_MAX_STRING * 2]; /* name and description...
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think it's worth experimenting with revisiting how our API for list mode should actually work [1] (so that we can reuse a single connection for both grabbing the list and finally using NBD_OPT_GO), but this change was easier to whip together while still thinking about that. [1]
2020 Aug 18
0
[libnbd PATCH v3 2/2] api: Add nbd_aio_opt_list
.../* Unique name assigned to this handle for debug messages * (to avoid having to print actual pointers). @@ -102,10 +111,7 @@ struct nbd_handle { /* Option negotiation mode. */ bool opt_mode; uint8_t opt_current; /* 0 or one of NBD_OPT_* */ - - /* Results of nbd_opt_list. */ - size_t nr_exports; - struct export *exports; + struct command_cb opt_cb; /* Full info mode. */ bool full_info; @@ -186,7 +192,7 @@ struct nbd_handle { union { struct { struct nbd_fixed_new_option_reply_server server; - char str[NBD_MAX_STRING * 2]; /* name and description...
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 statement near the end of the
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...= "\ +Set this flag to true on a handle in order to list NBD exports +provided by the server. + +In this mode, during connection we query the server for the list +of NBD exports and collect them in the handle. You can query +the list of exports provided by the server by calling +C<nbd_get_nr_exports> and C<nbd_get_export_name>. After choosing +the export you want, you should close this handle, create a new +NBD handle (C<nbd_create>), set the export name (C<nbd_set_export_name>), +and connect on the new handle. + +Some servers do not support listing exports at all. In +t...
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
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a single nbd connection for all cases when reading the heads of the file is not required), but I'm happy with patches 1-11, and 12-13 show where I'm headed for getting NBD_OPT_INFO to work. Posting now to see if some of the earlier patches are ready to commit while I continue working on the latter half. Eric Blake (13):
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...rue on a handle in order to list NBD exports > +provided by the server. > + > +In this mode, during connection we query the server for the list > +of NBD exports and collect them in the handle. You can query > +the list of exports provided by the server by calling > +C<nbd_get_nr_exports> and C<nbd_get_export_name>. After choosing > +the export you want, you should close this handle, create a new > +NBD handle (C<nbd_create>), set the export name (C<nbd_set_export_name>), > +and connect on the new handle. > + > +Some servers do not support listi...
2020 Jul 20
0
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...int i) > >+{ > >+ char *name; > >+ > >+ if (!h->list_exports) { > >+ set_error (EINVAL, "list exports mode not selected on this handle"); > >+ return NULL; > >+ } > >+ if (i < 0 || i >= (int) h->nr_exports) { > > That cast makes sense, but looks odd - any server that tries to send > more than 2G export names (by assuming that our size_t > 32 bits) is > sending a LOT of traffic in response to a single NBD_OPT_LIST > command. Would it be better to just track the list size as int, and...
2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...nal.h b/lib/internal.h index 4d0c4e1..8e1fe79 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -98,6 +98,9 @@ struct nbd_handle { int uri_allow_tls; bool uri_allow_local_file; + /* Option negotiation mode. */ + bool opt_mode; + /* List exports mode. */ bool list_exports; size_t nr_exports; @@ -398,6 +401,7 @@ extern int nbd_internal_set_block_size (struct nbd_handle *h, uint32_t min, /* is-state.c */ extern bool nbd_internal_is_state_created (enum state state); extern bool nbd_internal_is_state_connecting (enum state state); +extern bool nbd_internal_is_state_negotiating (enum st...
2020 Jul 31
6
[RFC nbdkit PATCH 0/4] Progress towards .list_exports
This takes Rich's API proposal and starts fleshing it out with enough meat that I was able to test 'nbdkit eval' advertising multiple exports with descriptions paired with 'qemu-nbd --list'. Eric Blake (3): server: Add exports list functions server: Prepare to use export list from plugin sh, eval: Add .list_exports support Richard W.M. Jones (1): server: Implement
2020 Aug 06
6
[nbdkit PATCH v2 0/5] .list_exports
Since v1: - patch 1: check size limits - patch 2: better handling of default export name canonicalization - patch 3: support filters as well as plugins - patch 4: new - patch 5: rewrite sh parser, fix testsuite to actually work and cover more cases (now that libnbd.git is fixed) Eric Blake (4): server: Add exports list functions server: Prepare to use export list from plugin log: Add