| 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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
This change restructures the source code directories, separates shared
form non-shared application code and adds CMake dependencies. These
dependencies allow the tracking of changes and trigger a rebuild of
those build targets where changed files are involved.
WARNING: Note that the support of the DNBD3_SERVER_AFL build option is
not supported yet. Thus, the option should be never turned on.
|
| |
|
|
|
|
|
|
| |
- Now uses linked lists instead of huge array
- Does prefetch data on client requests
- Can have multiple replication requests in-flight
|
| |
|
|
|
|
|
| |
If enabled, a failed fallocate will not abort image replication, but
retry with sparse mode.
|
|
|
|
|
|
|
|
| |
This setting allows you to control the formerly hard-coded timeout of 10
hours before a proxy would start deleting old images in order to free up
space for new images. Setting it to -1 entirely disables automatic
deletion, in case you have an external process for freeing up disk
space.
|
|
|
|
|
|
| |
Lock order is predefined in locks.h. Immediately bail out if a lock with
lower priority is obtained while the same thread already holds one with
higher priority.
|
| |
|
|
|
|
|
|
|
|
| |
Just assume sane platforms offer smart mutexes
that have a fast-path with spinlocks internally
for locks that have little to no congestion.
In all other cases, mutexes should perform better
anyways.
|
|
|
|
|
|
| |
This makes the server not set the FLAGS8_SERVER flag
when establishing an uplink connection. Useful mostly
for running a proxy on localhost for local caching.
|
| |
|
|
|
|
|
|
|
| |
Most config settings can now be changed at runtime
using SIGHUP. This currently excludes the basePath,
listenPort, and the client and image count limits,
as well as vmdkLegacyMode.
|
|
|
|
|
|
|
|
| |
This is a compromise; if you want to validate replicated data fairly
quickly, using this option will make background replication only kick in
when there's a "dirty" 16M block, i.e. some blocks within a 16M block
are cached locally, but not all. Completing the block makes it possible
to validate its CRC32 checksum.
|
|
|
|
|
| |
Background replication will not kick in if there aren't at least
that many clients connected.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
maxClients, maxImages, maxPayload, maxReplicationSize
Refs #3231
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Now that we can automatically load unknown images from disk on request,
it makes sense to remove non-working images from the image list. On
future requests, we will look for them on disk again, which is nice
in case of temporary storage hickups.
Also, some more ore less related locking has been refined (loading images,
replicating images)
|
| |
|
| |
|
|
|
|
|
|
| |
- Added message type parameter
- Log to file and stdout, no more logging in memory
- Added options to server.conf to filter which messages show up where
|
|
|
|
| |
Some minor debugging code, mostly commented out
|
|
|
|
|
|
|
| |
compare and some unused params)
Also allow newline at end of alt-servers file without complaining about it
not being a valid alt server definition.
|
|
|
|
| |
handling signals even though we block them
|
|
|
|
| |
function names
|
| |
|
|
|
|
| |
to config and code
|
|
|
|
| |
tested against varying bw/latency), retry sendfile call if ret <= len
|
| |
|
| |
|
|
|
|
|
| |
Split up helper.c, move file/disk related functions to fileutil.c
Uplink: Make sure relayed requests are at least 1MiB
|
|
|
|
|
|
| |
1) Close uplink if local copy is complete
2) Fix memleak when closing uplink (recv buffer was not cleared)
3) Add configurable artificial delays for client and server connections
|
| |
|
|
|
|
| |
empty cache map (so it needs an uplink server)
|
| |
|
| |
|
|
|