| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Will not preallocate images in this mode. Old images are only
deleted if the disk is full, determined by write() calls to
the cache file yielding ENOSPC or EDQUOT. In such a case,
the least recently used image(s) will be deleted to free
up at least 256MiB, and then the write() call will be repeated.
This *should* work somewhat reliably unless the cache partition
is ridiculously small. Performance might suffer a little, and
disk fragmentation might occur much faster than in prealloc
mode. Testing is needed.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Rounding to 4k so caching works efficiently
This should now close #3231
|
| |
|
|
|
|
|
| |
maxClients, maxImages, maxPayload, maxReplicationSize
Refs #3231
|
| |
|
|
|
|
| |
Refs #3231
|
|
|
|
|
| |
Just as in the fuse client, this will speed things up if
we have several alt-servers in our list which are not reachable.
|
|
|
|
|
|
| |
There might be more than one pending connect, but each call to
multiConnect() can return at most one fd, so we could be ignoring
some successful connections.
|
| |
|
| |
|
|
|
|
|
|
| |
This speeds up initialization with a long list of servers
where the first in the list don't work, as the delay between
servers is now lowered to 100ms.
|
|
|
|
|
|
|
|
|
|
| |
EINTR was apparently not handled properly on non-linux for the
connect() syscall.
sockaddr2dnbd3 is what resolveToDnbd3Host already did internally,
now it's its own function.
sock_multiConnect() is a wrapper around connect() and poll,
making it easy to connect to multiple hosts in a cascaded manner,
with a slight delay between connect calls.
|
|
|
|
|
|
|
| |
5 servers are considered "active", that is, are being measured
for their RTT regularly. If We have more than 5 servers and
one of the active ones isn't reachable repeatedly, the two
servers will swap position.
|
|
|
|
|
|
|
| |
Introduce new flag in "select image" message to tell the uplink server
whether we have background replication enabled or not. Also reject
a connecting proxy if the connecting proxy uses BGR but we don't, as this
would basically force the image to be replicated locally too.
|
| |
|
|
|
|
|
| |
This could have been an external tool, but this didn't add much code
and has the benefit of honoring the config file for port and bind address.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
If client reports protocol version < 3 on connect, just pretend
we're at the same version. This sucks but we can't update servers
before clients otherwise. :(
|
| |
|
|
|
|
| |
...there were quite a few format string errors as it turns out :/
|
|
|
|
|
|
| |
Less copy & paste for sendfile alternatives,
changed naming of old dnbd3_* functions moved
over from server.c a while ago.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
AFL is an instrumenting fuzzer.
It expects to pass input to the program to be tested
via command line (file name) or via stdin. This adds
support for reading messages that normally would arrive
via network directly from stdin. In this mode, the server
is pretty useless otherwise.
http://lcamtuf.coredump.cx/afl/
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
AF_INET luckily was "2" on all platforms checked, so no problems
there with interoperation, but AF_INET6 is different between
Linux, BSD, Windows and possibly others, so map back and forth
between AF_INET/AF_INET6 and HOST_IP4/HOST_IP6 to fix this.
|
|
|
|
|
|
| |
Use it to properly parse RPC queries. Will also come in handy
when parsing POST body for calls that actually trigger any
actions in the server (reload, alt-servers, ...)
|
|
|
|
|
|
|
| |
Simple and lean interface, no bloat, noice.
Slighly modified to use a simple string struct
for passing around strings that are not null
terminated, instead of separate char* and length.
|
|
|
|
|
| |
Pretty loose guesswork, but preventing the false positives
would not lead to any meaningful result anyways, so why bother.
|
| |
|
|
|
|
|
| |
Incremental updating of the global byte counter would only work when
background replication is disabled. Fix this.
|
| |
|
|
|
|
| |
Less writes to variables, more up-to-date values for uplinks.
|
|
|
|
|
|
| |
We order the list so that servers that fail are kept at
the end of the list. This is so that when we fetch servers
for RTT measurement, we're less likely to pick those.
|
|
|
|
|
|
| |
Previously, a fresh one was created and destroyed fo every read
requests. This caused a lot of syscalls when reading. Now
there's a simple cache of currently up to 6 signalfd.
|
|
|
|
|
|
|
| |
The server is always backwards compatible, and so should be the
client. If support for an older version will not be kept up,
MIN_SUPPORTED_{CLIENT,SERVER} will be increased accordingly
so that the connection is dropped.
|
| |
|
| |
|
|
|
|
|
|
| |
We only used it for CRC-32, so now the source
tree includes a stripped down version of the crc32
code from the zlib project.
|
|
|
|
| |
conversion problems
|
| |
|