| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Any request from a client being relayed to an uplink server will have
its size extended to this value. It will also be applied to background
replication requests, if the BGR mode is FULL.
As request coalescing is currently very primitive, this setting should
usually be left diabled, and bgrWindowSize used instead, if appropriate.
If you enable this, set it to something large (1M+), or it might have
adverse effects.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
When establishing a new connection on a disconnected device, the old
list of alt-servers was retained. This would lead to us connecting to
the wrong server, as the number of newly passed servers was used when
looping over the list of alt-servers to actually connect.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Incoming requests from clients might actually be prefetch jobs from
another downstream proxy. Don't do prefetching for those, as this would
cascade upwars in the proxy chain (prefetch for a prefetch of a prefetch)
Incoming requests might also be background replication. Don't relay
those if we're not configured for background replication as well.
|
|
|
|
|
|
|
| |
This will send all (block) requests immediately at sometimes more
overhead, but slighly less delays. Since the outgoing connection on a
client is only used very lightly, this tradeoff should always make
sense.
|
|
|
|
|
|
|
|
|
| |
There is a race condition where we process the next request from the
same client faster than the OS will schedule the async prefetch job,
rendering it a NOOP in the best case (request ranges match) or fetching
redundant data from the upstream server (prefetch range is larger than
actual request by client). Make prefetching synchronous to prevent this
race condition.
|
|
|
|
|
|
| |
If you need daemon mode, run as root with --daemon, normal users can
then request devices to be connected using the same binary WITHOUT
havind the suid bit set on it.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Remove the ugly timeout hack that apparently isn't required after all.
- Set a few socket options that appear to make sense in out use case (no
linger, only one SYN retry, NODELAY).
- Adapt socket timeout in panic mode, in case we're on a very bad
connection.
|
|
|
|
|
|
| |
Remove superflous, reduntant or otherwise useless
information. Use space as separator instead of comma
for better readability and easier parsing in shell etc.
|
|
|
|
|
|
|
| |
Similar logic already exists in the fuse client:
Count how many times in a row a server was fastest when
measuring RTTs, and lower the switching threshold
more the higher the count gets.
|
|
|
|
|
|
|
|
| |
Convert dnbd3_host_t to struct sockaddr immediately when
adding alt servers, so we don't have to convert it every time
we establish a connection. Additionally we can now use %pISpc
in printf-like functions instead of having if/else constructs
whenever we want to print an address.
|
|
|
|
|
| |
This avoids automatically switching back right after adding
and switching to a server.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The software version for packaging purposes is consituted from the
following rules:
- If the version information (from Git tags or the embedded version
header file) is available, the version number for the packaging is
set to those found version information.
- If there isn't any version information available (e.g. missing Git
tags), the version number for the packaging is set to '0.0' to
represent an unkown version number.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This change prevents the dnbd3-client to print the help text twice if
the help parameter is submitted. In addition to that, correct exit codes
are set after the help text is printed and the program terminates.
|
| |
|
| |
|
|
|
|
|
|
| |
This patch removes the automatic search of includes for 'libatomic'
since the includes for this library are part of the C11 standard
shipped with each compiler.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Formerly, the request that was about to be received was looked up in
the receive queue without removing it, then the request payload was
received from the socket while the lock was not being held, and finally,
the lock was required again and the request removed from the queue.
This is dangrous as another thread can concurrently take the request
from the queue while the receive thread reads the payload from the
socket, leading to a double-free by calling blk_mq_end_request twice.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change links the dnbd3-server with 'libatomic' to add support for
atomic operations not supported by hardware (especially 32-bit hardware
architectures, such as ARM). Thus the dnbd3-server can also run on a
Raspberry Pi 1 running Rasperry Pi OS.
Note that the dnbd3-server is still linked to the libatomic, even if the
hardware supports atomic operations. In this case, the compiler resolves
atomic operations and replaces them automatically with specific built-in
functions. This unnecessary linkage can be removed in the future if the
GCC supports an upcoming option called automatic linking of libatomic
(--enable-autolink-libatomic).
|