search for: option_repli

Displaying 20 results from an estimated 27 matches for "option_repli".

Did you mean: option_reply
2019 Jun 14
0
[libnbd PATCH 5/7] states: Factor out NBD_REP payload prep
Instead of repeating a check for valid reply headers in each sub-state machine, let's have a common helper function do all the work. Additionally, a central location will make it easier to uniformly capture any NBD_REP_ERR message payloads. --- generator/generator | 8 +-- generator/states-newstyle-opt-go.c | 40 +++----------
2019 Jun 14
10
[libnbd PATCH 0/7] state machine refactoring
I'm still playing with ideas on how to split rstate from wstate (so that we can send a request without waiting for POLLIN to complete a pending reply), but this is some preliminary refactoring I found useful. I also fixed a couple of bugs while in the area (already pushed). There's a question of whether we want nbd_handle to be nearly 5k, or if we should instead keep it small and add one
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must
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.
2019 May 19
5
[libnbd PATCH 0/4] Various interop fixes
Some of these affect attempts to connect to older qemu-nbd versions, some of them were triggered by manual edits to qemu-nbd source code to provoke various other compliant (if uncommon) server behaviors. Eric Blake (4): starttls: Skip error payload if falling back to unencrypted states: Reject payload to NBD_REP_ACK meta-context: Skip error payload if server lacks meta_context states: Add
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
A major missing feature of this library was the ability to list exports from an NBD server. This implements the feature by adding a new handle mode and additional functions for querying the list of export names. --- .gitignore | 1 + examples/Makefile.am | 14 +++ examples/list-exports.c | 108 +++++++++++++++++++
2019 Jun 14
1
Re: [libnbd PATCH 7/7] states: Capture NBD_REP_ERR message
On 6/14/19 4:54 PM, Eric Blake wrote: > Similar to the earlier patch for structured reply errors, it's worth > logging (at least through debug) any error messages that the server > sends alongside NBD_REP_ERR. And given our earlier changes, it > doesn't really impact the size of struct nbd_handle. > --- > +++ b/generator/states-newstyle.c > @@ -77,6 +77,35 @@
2019 Jun 14
0
[libnbd PATCH 7/7] states: Capture NBD_REP_ERR message
Similar to the earlier patch for structured reply errors, it's worth logging (at least through debug) any error messages that the server sends alongside NBD_REP_ERR. And given our earlier changes, it doesn't really impact the size of struct nbd_handle. --- generator/states-newstyle-opt-go.c | 5 ++-- .../states-newstyle-opt-set-meta-context.c | 6 +++-
2019 May 23
0
[PATCH libnbd 1/3] states: Factor out common code for setting export size and eflags.
Simple refactoring. --- generator/states-newstyle-opt-export-name.c | 12 +++++------ generator/states-newstyle-opt-go.c | 13 ++++++------ generator/states-oldstyle.c | 10 +++------- lib/flags.c | 22 +++++++++++++++++++++ lib/internal.h | 5 +++++ 5 files changed, 42 insertions(+), 20 deletions(-) diff
2020 Aug 14
0
[libnbd PATCH v2 12/13] wip: api: Give aio_opt_go a completion callback
Squash this into opt_go? into opt_info? Standalone? Testing: why does python not throw an exception: $ ./run nbdsh Welcome to nbdsh, the shell for interacting with Network Block Device (NBD) servers. The ‘nbd’ module has already been imported and there is an open NBD handle called ‘h’. h.connect_tcp ("remote", "10809") # Connect to a remote server. h.get_size ()
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-newstyle.c
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
2019 Jun 14
0
[libnbd PATCH 6/7] states: Give up on oversized reply length
Any server that sends a reply to NBD_OPT_* or NBD_CMD_* longer than the maximum length we are willing to use for NBD_CMD_{READ,WRITE} is probably broken; it is not worth waiting for read() to wait for that many bytes to arrive from the server to bring the connection back into sync for the next operation, so just declare it dead. It may be possible to provoke nbdkit into being such a server when
2019 May 23
5
[PATCH libnbd 0/3] Prevent some misuse of multi-conn.
Per recent discussion here: https://www.redhat.com/archives/libguestfs/2019-May/thread.html#00175
2020 Sep 28
0
[libnbd PATCH 3/3] api: Add nbd_opt_list_meta_context
Right now, we require the user to supply potential metacontext names in advance, without knowing what the server actually supports until after the connection or nbd_opt_info call is complete. But the NBD protocol also supports a client being able to query what contexts a server supports, including where a client asks with a prefix and the server replies back with all answers that match the
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
On 7/20/20 9:43 AM, Richard W.M. Jones wrote: > A major missing feature of this library was the ability to list > exports from an NBD server. This implements the feature by adding a > new handle mode and additional functions for querying the list of > export names. > --- > .gitignore | 1 + > examples/Makefile.am | 14
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]
2019 Jun 29
0
[libnbd PATCH 2/6] generator: Allow DEAD state actions to run
Most of the states were calling SET_NEXT_STATE(%.DEAD) then using return -1 on error, to reflect the fact that they had also called set_error() and wanted the caller to notice the failure. Unfortunately, the state machine engine refuses to run the entry code of the next state when the current state returned -1, which meant the DEAD state entry code never runs. A concrete example of the problems
2023 Aug 03
1
[libnbd PATCH v4 20/25] generator: Actually request extended headers
This is the culmination of the previous patches' preparation work for using extended headers when possible. The new states in the state machine are copied extensively from our handling of OPT_STRUCTURED_REPLY. The next patch will then expose a new API nbd_opt_extended_headers() for manual control. At the same time I posted this patch, I had patches for qemu-nbd to support extended headers
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 nbd_set_export_name, or even request NBD_OPT_INFO