Displaying 20 results from an estimated 2000 matches similar to: "[PATCH libnbd 0/3] states: Use MSG_MORE to coalesce messages."
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 24
4
[libnbd PATCH 0/3] Expose server block size constraints
Necessary when writing a client that wants to avoid unnecessary EINVAL
errors from sending unaligned requests.
At some point, we may want to add synchronous convenience API wrappers
that do request splitting or read-modify-write to obey server
constraints while still appearing to the library client as accepting
any possible request. But such a wrapper should only be synchronous
and not copied to
2019 Jun 09
1
Re: [PATCH libnbd 2/3] states: Add handle h->wflags field.
There's an obvious bug in this patch in that it doesn't reset the
h->wflags field in all cases. Updated patch below.
I rechecked the performance measurements and they are the same after
the updated patch.
Rich.
>From 15a687b50acecebcfd3dc6222d93e6df984b83c6 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 8 Jun 2019 19:12:22 +0100
2019 Jun 12
3
[libnbd PATCH 0/2] More with MSG_MORE
I'm not sure if this is worth pursuing. On paper, it makes sense (if
we know we have multiple commands batched to send over the wire, AND
those commands are short in length, we might as well use MSG_MORE),
but the measurement numbers with it applied might just be in the
noise.
Eric Blake (2):
examples: Enhance access patterns of threaded-reads-and-writes
states: Another use for MSG_MORE
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to
prove whether it makes the code any faster or easier to maintain, but
at least the added example shows one good use case for the new API.
Eric Blake (6):
api: Add nbd_aio_in_flight
generator: Allow DEAD state actions to run
generator: Allow Int64 in callbacks
states: Prepare for aio notify callback
api: Add new
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
2019 May 21
9
[libnbd PATCH 0/3] Avoid deadlock with in-flight commands
This might not be the final solution, but it certainly seems to solve
a deadlock for me that I could trigger by using 'nbdkit
--filter=noparallel memory 512k' and calling nbd_aio_pread for a
request larger than 256k (enough for the Linux kernel to block the
server until libnbd read()s), immediately followed by nbd_aio_pwrite
for a request larger than 256k (enough to block libnbd until the
2019 May 22
12
[libnbd PATCH v3 0/7] Avoid deadlock with in-flight commands
Since v2:
- rebase to Rich's new API calls
- more refactoring in patch 1 (retitled)
- new patches 3 and 4
- fix data corruption in patch 6 (was 4)
- more tweaks to the reproducer example (including using new API from 3)
Eric Blake (7):
lib: Refactor command_common() to do more common work
commands: Allow for a command queue
commands: Expose FIFO ordering of server completions
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 May 22
10
[libnbd PATCH v2 0/5] Avoid deadlock with in-flight commands
On v1, we discussed whether cmds_to_issue needed to be a list, since
it never had more than one element. I played with the idea of making
it a list, and allowing the client to queue up new commands regardless
of whether the state machine is currently in READY. I also polished up
the tmp demo into a bit more full-fledged example file, worth
including since it also let me discover a hard-to-hit race
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):
2019 Jun 08
0
[PATCH libnbd 3/3] states: Use MSG_MORE to coalesce messages into single packets.
Since we disabled Nagle's algorithm we may send very small packets
over the wire in some situations where we are calling send(2) from
states that are responsible for small parts of the protocol. By
setting the MSG_MORE flag we can indicate to the kernel that more data
will follow (usually) immediately and so it can append the data to the
same outgoing packet.
Although there is some
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
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 Oct 27
6
[PATCH libnbd 0/5] info: --map: Coalesce adjacent extents of the same type.
This adds coalescing of adjacent extents of the same type, as
mentioned by Eric Blake in the commit message here:
https://github.com/libguestfs/libnbd/commit/46072f6611f80245846a445766da071e457b00cd
The patch series is rather long because it detours through adding the
<vector.h> library from nbdkit into libnbd and replacing ad hoc uses
of realloc, char ** etc in various places.
Rich.
2019 Sep 16
1
[libnbd PATCH] api: Add set_handshake_flags for integration
Similar to the recent --mask-handshake command line added to nbdkit to
test client fallbacks to crippled servers, it can be worth testing
server fallbacks to crippled clients. And just as we have exposed
whether the client will request structured replies, we can also expose
whether the client will understand various handshake flags from the
NBD protocol.
Of course, we default to supporting all
2019 Jun 09
2
[PATCH libnbd] states: In recv_into_rbuf and send_from_wbuf loop until EAGAIN.
I thought this should produce a fairly dramatic performance gain. In
fact I couldn't measure any performance difference at all. I think
what's happening is we're actually paying an extra syscall (to
discover the socket would block) and then doing the poll anyway.
So I don't know if it's worth having this patch. It could be argued
that it makes the code shorter (therefore
2020 Mar 30
4
[libnbd PATCH 0/2] fix hangs against nbdkit 1.2
nbdkit 1.2 as a server waits for read() to see EOF, even after the
client has sent NBD_CMD_DISC. That was fixed in mbdkit 1.4; and most
modern NBD servers are smarter than this (they close() the write end
of their traffic soon after NBD_CMD_DISC). But it's easy enough to
revert nbdkit commit c70616f8 to get back to a server with the same
behavior as the older nbdkit, at which point both
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a
lot of testsuite coverage as well as putting the new API to use in
nbdinfo.
Eric Blake (2):
api: Add nbd_opt_list_meta_context
info: List available meta-contexts
lib/internal.h | 1 +
generator/API.ml | 84 ++++++++-