search for: nbd_opt_structured_reply

Displaying 20 results from an estimated 48 matches for "nbd_opt_structured_reply".

2018 Apr 12
2
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
...gt; be better to use qemu-nbd? > > You just start a new qemu-nbd process instead of faffing around with > configuration files, kill the qemu-nbd process when you're done, and > qemu-nbd supports qcow2 already. That, and qemu-nbd supports extensions such as NBD_CMD_BLOCK_STATUS and NBD_OPT_STRUCTURED_REPLY that nbd-server has not implemented yet; a qemu NBD client talking to a qemu-nbd server is thus going to be able to take advantage of those extensions for better performance that would not be possible with a qemu NBD client talking to an nbd-server instance (at least, not without someone implementi...
2019 Jun 14
0
[libnbd PATCH 5/7] states: Factor out NBD_REP payload prep
...e any newstyle NBD_OPT_STARTTLS reply payload"; external_events = [ NotifyRead, "" ]; }; @@ -425,8 +425,8 @@ and newstyle_opt_structured_reply_state_machine = [ State { default_state with - name = "SKIP_REPLY_PAYLOAD"; - comment = "Skip newstyle NBD_OPT_STRUCTURED_REPLY reply payload"; + name = "RECV_REPLY_PAYLOAD"; + comment = "Receive any newstyle NBD_OPT_STRUCTURED_REPLY reply payload"; external_events = [ NotifyRead, "" ]; }; diff --git a/generator/states-newstyle-opt-go.c b/generator/states-newstyle-opt-go.c i...
2019 Apr 23
0
[nbdkit PATCH 7/7] nbd: Implement structured replies
...(fd, &r, sizeof r) != sizeof r) { nbdkit_error ("failed to write pipe: %m"); abort (); } @@ -527,7 +694,25 @@ nbd_newstyle_haggle (struct handle *h) char *buffer; uint16_t info; - /* TODO: structured reads, block status */ + nbdkit_debug ("trying NBD_OPT_STRUCTURED_REPLY"); + opt.version = htobe64 (NEW_VERSION); + opt.option = htobe32 (NBD_OPT_STRUCTURED_REPLY); + opt.optlen = htobe32 (0); + if (write_full (h->fd, &opt, sizeof opt)) { + nbdkit_error ("unable to request NBD_OPT_STRUCTURED_REPLY: %m"); + return -1; + } + if (nbd_news...
2022 Nov 14
2
[PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS
...y, and the structured reply chunk. The +There are two general message types in the transmission phase: the +request (simple or extended), and the reply (simple, structured, or +extended). The determination of which message headers to use is +determined during handshaking phase, based on whether +`NBD_OPT_STRUCTURED_REPLY` or `NBD_OPT_EXTENDED_HEADERS` was requested +by the client and given a successful response by the server. The transmission phase consists of a series of transactions, where the client submits requests and the server sends corresponding replies with either a single simple reply or a series of o...
2019 Mar 08
2
[PATCH nbdkit] Minimal implementation of NBD Structured Replies.
...#define NBD_OPT_INFO 6 -#define NBD_OPT_GO 7 +#define NBD_OPT_EXPORT_NAME 1 +#define NBD_OPT_ABORT 2 +#define NBD_OPT_LIST 3 +#define NBD_OPT_STARTTLS 5 +#define NBD_OPT_INFO 6 +#define NBD_OPT_GO 7 +#define NBD_OPT_STRUCTURED_REPLY 8 extern const char *name_of_nbd_rep (int); #define NBD_REP_ACK 1 @@ -144,15 +145,49 @@ struct request { uint32_t count; /* Request length. */ } __attribute__((packed)); -/* Reply (server -> client). */ -struct reply { - uint32_t magic; /* NBD_RE...
2018 Apr 12
0
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
...nbd? > > > > You just start a new qemu-nbd process instead of faffing around with > > configuration files, kill the qemu-nbd process when you're done, and > qemu-nbd supports qcow2 already. > That, and qemu-nbd supports extensions such as NBD_CMD_BLOCK_STATUS and > NBD_OPT_STRUCTURED_REPLY that nbd-server has not implemented yet; a qemu > NBD client talking to a qemu-nbd server is thus going to be able to take > advantage of those extensions for better performance that would not be > possible with a qemu NBD client talking to an nbd-server instance (at > least, not withou...
2020 Aug 17
1
Re: [libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
On Fri, Aug 14, 2020 at 05:00:25PM -0500, Eric Blake wrote: > diff --git a/lib/internal.h b/lib/internal.h > index 5f495fb..03baacd 100644 > --- a/lib/internal.h > +++ b/lib/internal.h > @@ -101,6 +101,7 @@ struct nbd_handle { > > /* Option negotiation mode. */ > bool opt_mode; > + uint8_t current_opt; Be nice to add a comment here about what current_opt can
2023 Apr 13
6
[PATCH v3 0/6] NBD 64-bit extensions (spec only)
v2 was here: https://lists.debian.org/nbd/2022/11/msg00030.html The bulk of the changes since then are: - forbid NBD_OPT_EXPORT_NAME once extended headers are negotiated (Wouter) - consistently use 'maximum payload', rather than a haphazard mix of 'maximum block payload' (Vladimir) At this point, I want to make sure we are happy with the spec before re-posting patches for
2019 Apr 23
12
[nbdkit PATCH 0/7] Implement structured replies in nbd plugin
I'm hoping to implement .extents for the nbd plugin; this is a prerequisite. I'm not sure about patch 3 - if we like it, I'll squash it to 2, if we don't, I think we are okay just dropping it. I'm also wondering if we have to worry about malicious plugins that don't populate the entire .pread buffer in an effort to get nbdkit to expose portions of the heap; my patch 7 loses
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 Apr 25
6
[nbdkit PATCH v2 0/5] structured replies/.extents for nbd plugin
Updated based on other changes that have happened in the meantime: - rely more on cleanup.h (throughout) - split structured read for easier review (patch 2 and 3 were combined in v1) - rely on nbdkit not leaking a server's partial answer (patch 3) - add tests (patch 5) - other bug fixes I found while testing it - drop EOVERFLOW patch for now; it will be separate once upstream NBD protocol
2019 Mar 08
0
Re: [PATCH nbdkit] Minimal implementation of NBD Structured Replies.
On 3/8/19 4:04 AM, Richard W.M. Jones wrote: > This is about the simplest implementation of NBD Structured Replies > (SR) that we can do right now. > > It accepts NBD_OPT_STRUCTURED_REPLIES when negotiated by the client, > but only sends back the simplest possible SR when required to by > NBD_CMD_READ. The rest of the time it will send back simple replies > as before. We do
2019 May 30
5
[nbdkit PATCH 0/4] Play with libnbd for nbdkit-add
Patch 1 played with an early draft of Rich's Fedora 30 libnbd package: https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17 Note that comment 21 provides a newer package 0.1.1-1 with a different API; and that libnbd has more unreleased API changes in the pipeline (whether that will be called 0.2 or 0.1.2); so we'll have to tweak things based on what is actually available in distros.
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
...the server to - send its defaults. TODO: nbdkit should let plugins report block - sizes, at which point we should request NBD_INFO_BLOCK_SIZE and - obey any sizes set by server. */ - uint16_t nrinfos = htobe16 (0); - struct fixed_new_option_reply reply; - - nbdkit_debug ("trying NBD_OPT_STRUCTURED_REPLY"); - opt.version = htobe64 (NEW_VERSION); - opt.option = htobe32 (NBD_OPT_STRUCTURED_REPLY); - opt.optlen = htobe32 (0); - if (write_full (h->fd, &opt, sizeof opt)) { - nbdkit_error ("unable to request NBD_OPT_STRUCTURED_REPLY: %m"); - return -1; - } - if (nbdplug_...
2019 Jun 02
5
[nbdkit PATCH v2 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.2-1 is now available in Fedora 29/30 updates-testing, although it was not compiled against libxml2 so it lacks uri support (I ended up testing patch 4 with a self-built libnbd). Diffs since v1 - rebase to master, bump from libnbd 0.1 to 0.1.2, add URI support, better timing results Still not done - patch 5 needs associated tests Eric Blake (5): nbd: Check for libnbd nbd:
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...the server to - send its defaults. TODO: nbdkit should let plugins report block - sizes, at which point we should request NBD_INFO_BLOCK_SIZE and - obey any sizes set by server. */ - uint16_t nrinfos = htobe16 (0); - struct fixed_new_option_reply reply; - - nbdkit_debug ("trying NBD_OPT_STRUCTURED_REPLY"); - opt.version = htobe64 (NEW_VERSION); - opt.option = htobe32 (NBD_OPT_STRUCTURED_REPLY); - opt.optlen = htobe32 (0); - if (write_full (h->fd, &opt, sizeof opt)) { - nbdkit_error ("unable to request NBD_OPT_STRUCTURED_REPLY: %m"); - return -1; - } - if (nbdplug_...
2020 Mar 19
1
[nbdkit PATCH] nbd: Drop nbd-standalone fallback
...server to - send its defaults. TODO: nbdkit should let plugins report block - sizes, at which point we should request NBD_INFO_BLOCK_SIZE and - obey any sizes set by server. */ - uint16_t nrinfos = htobe16 (0); - struct nbd_fixed_new_option_reply reply; - - nbdkit_debug ("trying NBD_OPT_STRUCTURED_REPLY"); - opt.version = htobe64 (NBD_NEW_VERSION); - opt.option = htobe32 (NBD_OPT_STRUCTURED_REPLY); - opt.optlen = htobe32 (0); - if (write_full (h->fd, &opt, sizeof opt)) { - nbdkit_error ("unable to request NBD_OPT_STRUCTURED_REPLY: %m"); - return -1; - } - if (nbd_...
2020 May 20
0
[PATCH nbdkit] tests/test-truncate4.sh: Rewrite to use nbdsh.
...debug: file: preconnect nbdkit: file[1]: debug: newstyle negotiation: flags: global 0x3 + echo 'Resizing down' Resizing down + truncate -s 512 truncate4.data nbdkit: file[1]: debug: newstyle negotiation: client flags: 0x3 nbdkit: file[1]: debug: newstyle negotiation: NBD_OPT_STRUCTURED_REPLY: client requested structured replies Here are still connecting to nbdkit from "connection A", long after the sleep has finished and the truncate has been done. Instead of increasing the sleep and hoping for the best, I chose to rewrite the test to use nbdsh. This allows us to control b...
2018 Apr 12
2
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
On Thu, Apr 12, 2018 at 2:07 AM Nir Soffer <nirsof@gmail.com> wrote: > On Tue, Apr 10, 2018 at 6:53 PM Richard W.M. Jones <rjones@redhat.com> > wrote: > ... > Dan Berrange pointed out earlier on that it might be easier if imageio >> > just exposed NBD, or if we found a way to tunnel NBD requests over web >> sockets (in the format case nbdkit would not be
2019 Jun 12
8
[nbdkit PATCH v3 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.4-1 is now available in Fedora 29/30 updates testing. Diffs since v2 - rebase to master, bump from libnbd 0.1.2 to 0.1.3+, add tests to TLS usage which flushed out the need to turn relative pathnames into absolute, doc tweaks Now that the testsuite covers TLS and libnbd has been fixed to provide the things I found lacking when developing v2, I'm leaning towards pushing this on