search for: nbdplug_reply

Displaying 17 results from an estimated 17 matches for "nbdplug_reply".

2019 Jul 01
3
[nbdkit PATCH 0/2] Use new libnbd _notify functions
I'm not observing any noticeable performance differences, but I'm liking the diffstat. I can't push this patch until we release a new libnbd version with the _notify API addition, but am posting it now for playing with things. Eric Blake (2): nbd: Move transaction info from heap to stack nbd: Use nbdkit aio_*_notify variants plugins/nbd/nbd.c | 217
2019 Jul 17
3
[nbdkit PATCH 0/2] Another libnbd API bump
libnbd 0.1.7 was released today, which breaks compilation of nbdkit-nbd-plugin. We could work around it by using #ifdef LIBNBD_HAVE_XXX to learn about the renamed functions, but supporting older versions is not all that important when we don't yet have API stability. So patch 1 copes by just bumping the minimum version instead, except that we have yet another pending libnbd patch with an API
2019 Jul 17
0
[nbdkit PATCH 2/2] nbd: Another libnbd API bump
...t (!flags); nbdplug_prepare (&s); nbdplug_register (h, &s, nbd_aio_pread_callback (h->nbd, buf, count, offset, - &s, nbdplug_notify, 0)); + nbdplug_notify, &s, 0)); return nbdplug_reply (h, &s); } @@ -689,7 +689,7 @@ nbdplug_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, assert (!(flags & ~NBDKIT_FLAG_FUA)); nbdplug_prepare (&s); nbdplug_register (h, &s, nbd_aio_pwrite_callback (h->nbd, buf, count, offset, -...
2019 Jul 01
0
[nbdkit PATCH 2/2] nbd: Use nbdkit aio_*_notify variants
...EAGAIN) nbdkit_debug ("failed to kick reader thread: %m"); + assert (trans->cookie == 0 || trans->cookie == cookie); trans->cookie = cookie; - trans->next = h->trans; - h->trans = trans; } /* Perform the reply half of a transaction. */ @@ -449,8 +405,13 @@ nbdplug_reply (struct handle *h, struct transaction *trans) nbdkit_debug ("failed to wait on semaphore: %m"); err = EIO; } - else + else { + assert (trans->cookie > 0); + err = nbd_aio_command_completed (h->nbd, trans->cookie); + assert (err != 0); +...
2019 Aug 15
3
[nbdkit PATCH] nbd: Another libnbd version bump
..._register (h, &s, nbd_aio_pread_callback (h->nbd, buf, count, offset, - nbdplug_notify, &s, 0)); + nbdplug_register (h, &s, nbd_aio_pread (h->nbd, buf, count, offset, + s.cb, 0)); return nbdplug_reply (h, &s); } @@ -709,8 +711,8 @@ nbdplug_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, assert (!(flags & ~NBDKIT_FLAG_FUA)); nbdplug_prepare (&s); - nbdplug_register (h, &s, nbd_aio_pwrite_callback (h->nbd, buf, count, offset, -...
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
...reply, and look up the corresponding transaction. - Return the server's non-negative answer (converted to local errno - value) on success, or -1 on read failure. If structured replies - were negotiated, trans_out is set to NULL if there are still more replies - expected. */ -static int -nbdplug_reply_raw (struct handle *h, struct transaction **trans_out) -{ - union { - struct simple_reply simple; - struct structured_reply structured; - } rep; - struct transaction *trans; - void *buf = NULL; - CLEANUP_FREE char *payload = NULL; - uint32_t count; - uint32_t id; - struct block_descri...
2019 Jun 27
1
[nbdkit PATCH] nbd: Update for libnbd 0.1.5
...e. --- plugins/nbd/nbd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c index 68ea3dd0..818f94d6 100644 --- a/plugins/nbd/nbd.c +++ b/plugins/nbd/nbd.c @@ -783,9 +783,18 @@ nbdplug_flush (void *handle, uint32_t flags) return nbdplug_reply (h, s); } +/* XXX: Hack this signature to compile to 0.1.3 (minimum configure + * version) as well as 0.1.5 (API change, with witness of the addition + * of pread_structured at the same release). Once configure requires a + * higher minimum version, the #if hack can be dropped. + */ static int...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...reply, and look up the corresponding transaction. - Return the server's non-negative answer (converted to local errno - value) on success, or -1 on read failure. If structured replies - were negotiated, trans_out is set to NULL if there are still more replies - expected. */ -static int -nbdplug_reply_raw (struct handle *h, struct transaction **trans_out) -{ - union { - struct simple_reply simple; - struct structured_reply structured; - } rep; - struct transaction *trans; - void *buf = NULL; - CLEANUP_FREE char *payload = NULL; - uint32_t count; - uint32_t id; - struct block_descri...
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 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
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
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
When using the nbd_aio_FOO_callback commands, there is nothing further to be learned about the command by calling nbd_aio_command_completed() compared to what the callback already had access to. There are still scenarios where manually retiring the command after the fact is useful (whether the return was 0 to keep the status unchanged, or -1 to alter the retirement status to *error), but by
2020 Aug 28
4
[nbdkit PATCH 0/3] .list_exports in nbd plugin
Another series on top of my exportname filter, marking off another todo bullet point. With this, you can now use the NBD plugin as a transparent passthrough of all export names served by the remote server in both directions (list advertisement server to client, and export name from client to server). Eric Blake (3): nbd: Implement .default_export, .export_description nbd: Add
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
...#if LIBNBD_HAVE_NBD_CAN_FAST_ZERO + if (flags & NBDKIT_FLAG_FAST_ZERO) + f |= LIBNBD_CMD_FLAG_FAST_ZERO; +#else + assert (!(flags & NBDKIT_FLAG_FAST_ZERO)); +#endif nbdplug_prepare (&s); nbdplug_register (h, &s, nbd_aio_zero (h->nbd, count, offset, s.cb, f)); return nbdplug_reply (h, &s); @@ -831,6 +856,7 @@ static struct nbdkit_plugin plugin = { .is_rotational = nbdplug_is_rotational, .can_trim = nbdplug_can_trim, .can_zero = nbdplug_can_zero, + .can_fast_zero = nbdplug_can_fast_zero, .can_fua = nbdplug_can_fua,...
2020 Jun 30
5
[PATCH nbdkit 0/5 NOT WORKING] nbd: Implement command= and socket-fd= parameters.
...=' qemu-nbd -f qcow2 disk.qcow2 ' and place filters in front. nbdkit would deal with clean up of the qemu-nbd process. However I've been staring at this most of the day and for reasons I don't understand the nbd plugin deadlocks. Specifically it waits forever on the semaphore in nbdplug_reply. A second problem with this patch (maybe related to the first??) is that the command is specified as a string, but the libnbd API wants an argv[]. There's no really good way to specify an argv as parameters of an nbdkit plugin. You'd end up having to write something pretty clunky such as...
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update