search for: nbd_opt

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

Did you mean: nbd_opt_
2019 Sep 30
0
Re: [nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
On 9/28/19 3:07 PM, Richard W.M. Jones wrote: > On Fri, Sep 27, 2019 at 11:48:47PM -0500, Eric Blake wrote: >> Fixes the fact that clients could not request the maximum string >> length except with NBD_OPT_EXPORT_LEN. Updates the testsuite to >> match. >> >> Signed-off-by: Eric Blake <eblake@redhat.com> >> --- >> server/protocol-handshake-newstyle.c | 12 +++++++----- >> tests/test-long-name.sh | 10 ++++------ >> 2 files changed, 11 i...
2019 Sep 30
0
Re: [nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
On 9/28/19 4:38 PM, Richard W.M. Jones wrote: > On Fri, Sep 27, 2019 at 11:48:47PM -0500, Eric Blake wrote: >> Fixes the fact that clients could not request the maximum string >> length except with NBD_OPT_EXPORT_LEN. Updates the testsuite to >> match. >> >> Signed-off-by: Eric Blake <eblake@redhat.com> >> --- >> @@ -255,7 +255,7 @@ negotiate_handshake_newstyle_options (struct connection *conn) >> uint64_t version; >> uint32_t option; >>...
2019 Sep 28
0
[nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
Fixes the fact that clients could not request the maximum string length except with NBD_OPT_EXPORT_LEN. Updates the testsuite to match. Signed-off-by: Eric Blake <eblake@redhat.com> --- server/protocol-handshake-newstyle.c | 12 +++++++----- tests/test-long-name.sh | 10 ++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/server/protocol-hands...
2019 Sep 28
2
Re: [nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
On Fri, Sep 27, 2019 at 11:48:47PM -0500, Eric Blake wrote: > Fixes the fact that clients could not request the maximum string > length except with NBD_OPT_EXPORT_LEN. Updates the testsuite to > match. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > server/protocol-handshake-newstyle.c | 12 +++++++----- > tests/test-long-name.sh | 10 ++++------ > 2 files changed, 11 insertions(+), 11 deletions(-)...
2019 Sep 28
3
Re: [nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
On Fri, Sep 27, 2019 at 11:48:47PM -0500, Eric Blake wrote: > Fixes the fact that clients could not request the maximum string > length except with NBD_OPT_EXPORT_LEN. Updates the testsuite to > match. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > server/protocol-handshake-newstyle.c | 12 +++++++----- > tests/test-long-name.sh | 10 ++++------ > 2 files changed, 11 insertions(+), 11 deletions(-)...
2019 May 28
1
Re: [libnbd PATCH 4/4] api: Add DF flag support for pread
...ion handshake) but still > implement their own non-standard NBD extensions that the server will > understand (where the libnbd state machine parses the chunks off the > wire, but the client then interprets those chunks). Which means we may > also need hooks for a client to inject other NBD_OPT sequences into the > state machine beyond what we know natively. This could be interesting too. I wonder if there are really going to be such extensions? > Various ideas still floating around, it may be a while before we > actually have code to match those ideas in order to pick what wo...
2019 May 28
2
Re: [libnbd PATCH 4/4] api: Add DF flag support for pread
On Mon, May 27, 2019 at 09:01:01PM -0500, Eric Blake wrote: > diff --git a/lib/rw.c b/lib/rw.c > index feaf468..343c340 100644 > --- a/lib/rw.c > +++ b/lib/rw.c > @@ -234,11 +234,17 @@ int64_t > nbd_unlocked_aio_pread (struct nbd_handle *h, void *buf, > size_t count, uint64_t offset, uint32_t flags) > { > - if (flags != 0) { > + if ((flags
2019 May 28
0
Re: [libnbd PATCH 4/4] api: Add DF flag support for pread
...ing up a tls connection handshake) but still implement their own non-standard NBD extensions that the server will understand (where the libnbd state machine parses the chunks off the wire, but the client then interprets those chunks). Which means we may also need hooks for a client to inject other NBD_OPT sequences into the state machine beyond what we know natively. Various ideas still floating around, it may be a while before we actually have code to match those ideas in order to pick what works best. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualizat...
2019 Sep 28
0
[nbdkit PATCH v2 7/7] server: Better newstyle .open failure handling
If a plugin's .open or .get_size or .can_write fails, right now that is fatal to the connection. When nbdkit was first implemented, this made sense (there was no way to report errors to oldstyle or NBD_OPT_EXPORT_NAME). But now that newstyle is around, it's rather abrupt to hang up on the client, and better is to return an error to NBD_OPT_GO, and let the client choose what to do (most clients will probably hang up, whether gracefully with NBD_OPT_ABORT or abruptly, rather than try other NBD_OPT...
2020 Aug 11
3
Re: [libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...state transition: Created - Progress only by command issue - namely one of nbd_connect_* Connecting - Progress by aio_notify_read/aio_notify_write (as driven by aio_poll), and progresses through socket establishment and magic numbers Loop of: Negotiating - Progress by command issue (nbd_opt_*) Connecting - Progress by aio_notify_read/aio_notify_write, no commands accepted, and processes remaining handshaking Before getting back to Ready and the normal loop. One thing to remember is that handshaking is always synchronous - the client is not allowed to send the next NBD_OPT...
2020 Aug 11
0
Re: [libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...r of opt negotiation can be controlled by the caller.  (I >> really need to write a states -> dot graph visualizer!)  When we've >> got to the negotiating state we can then get the list of exports, set >> the export name we want, and then finish the connection with >> nbd_opt_go. > > For now, OPT_STRUCTURED_REPLY is still automatic, although I might > expose it to the user to attempt (I'm certainly thinking about what else > to expose or keep automatic in followup patches; letting the user > control OPT_STARTTLS when tls=1 (but not when tls=0 or t...
2019 Jun 14
1
[libnbd PATCH] states: Validate error message size
...parate from the message, which also lets us add other sanity checking, and makes it easier if a future patch wants to capture instead of ignore the server's message. --- I'm looking at installing a few other length sanity checks as well: we ought to require that the server's answers to NBD_OPT and NBD_CMD don't exceed MAX_REQUEST_SIZE (other than a bit of fudge to allow payload + header when handling NBD_CMD_READ for 64M). Also, the NBD spec says strings must not exceed 4k (we need to enforce this on the export name we send to the server, and should also check any string field the se...
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...te_machine); > Group ("OPT_SET_META_CONTEXT", newstyle_opt_set_meta_context_state_machine); > Group ("OPT_GO", newstyle_opt_go_state_machine); > @@ -341,6 +342,44 @@ and newstyle_opt_starttls_state_machine = [ > }; > ] > > +(* Fixed newstyle NBD_OPT_LIST option. *) > +and newstyle_opt_list_state_machine = [ > + State { > + default_state with > + name = "START"; > + comment = "Start listing exports if in list mode."; > + external_events = []; > + }; > + > + State { > + default_...
2019 Sep 28
11
[nbdkit PATCH v2 0/7] Spec compliance patches
...qemu 4.1, because otherwise qemu fails early without involving nbdkit. Eric Blake (7): server: Reject -e with too long of a name server: Expose -e in $exportname during --run server: Switch to fixed-length conn->exportname server: Improve check of string validity server: Allow longer NBD_OPT server: Fix OPT_GO on different export than SET_META_CONTEXT server: Better newstyle .open failure handling docs/nbdkit-captive.pod | 12 ++- server/internal.h | 4 +- server/Makefile.am | 1 + server/captive.c | 22 +...
2019 Jun 06
4
[nbdkit PATCH 0/2] Reduce network overhead with corking
Slightly RFC, as I need more time to investigate why Unix sockets appeared to degrade with this patch. But as TCP sockets (over loopback to localhost) and TLS sessions (regardless of underlying Unix or TCP) both showed improvements, this looks like a worthwhile series. Eric Blake (2): server: Add support for corking server: Cork around grouped transmission send()s server/internal.h | 3
2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
This is the bare minimum needed to allow the user to take control over the rest of option negotiating. This patch adds several new API: nbd_set_opt_mode() - called during Created to enable the new mode nbd_get_opt_mode() - query whether opt mode is enabled nbd_opt_go() - used in Negotiating state to attempt to use export nbd_opt_abort() - used in Negotiating state to skip Connected state nbd_aio_is_negotiating() - used to detect Negotiating state Older clients that do not use nbd_set_opt_mode see no difference: the new state is never reached, all configurat...
2020 Jul 21
4
[PATCH nbdkit] server: Pass the export name through filter .open calls.
...xportname) parameter if they need the export name. Filter .reopen also takes the exportname. The only filter that uses it (retry) must save the exportname from .open in order to pass it to .reopen. This filter already does the same for the readonly flag so this seems reasonable. The handling of NBD_OPT_SET_META_CONTEXT interacted with the export name (see commit 20b8509a9ccdab118ce7b7043be63bbad74f1e79). I have attempted to keep previous behaviour in this change, but note that there is no regression test for this. I added a debug message so we can tell when this unusual case actually happens wh...
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...if (conn->send (conn, - &fixed_new_option_reply, + if (conn->send (&fixed_new_option_reply, sizeof fixed_new_option_reply, 0) == -1) { /* The protocol document says that the client is allowed to simply * drop the connection after sending NBD_OPT_ABORT, or may read @@ -77,9 +76,9 @@ send_newstyle_option_reply (struct connection *conn, } static int -send_newstyle_option_reply_exportname (struct connection *conn, - uint32_t option, uint32_t reply) +send_newstyle_option_reply_exportname (uint32_t optio...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html v2 replaces struct connection *conn = GET_CONN; with GET_CONN; which sets conn implicitly and asserts that it is non-NULL. If we actually want to test if conn is non-NULL or behave differently, then you must use threadlocal_get_conn() instead, and some existing uses do that. Rich.
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of passing around struct connection * entirely within the server, preferring instead to reference the connection through thread-local storage. I hope this is a gateway to simplifying other parts of the code. Rich.