summaryrefslogtreecommitdiffstats
path: root/src/server/globals.c
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] Add minRequestSize: Enlarge relayed requestsSimon Rettberg2021-05-111-10/+27
| | | | | | | | | | 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.
* [SERVER] Make prefetching synchronousSimon Rettberg2021-04-141-13/+16
| | | | | | | | | 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.
* [BUILD] rewrite CMake build system to track changes of source filesManuel Bentele2020-10-161-1/+1
| | | | | | | | | | 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.
* [SERVER] Make sure bgrWindowSize doesn't overwhelm uplink queueSimon Rettberg2020-03-171-0/+4
|
* [SERVER] Rewrite uplink queue handlingSimon Rettberg2020-03-131-0/+6
| | | | | | - Now uses linked lists instead of huge array - Does prefetch data on client requests - Can have multiple replication requests in-flight
* [SERVER] Handle "warn unused result" casesSimon Rettberg2020-03-061-1/+4
|
* [SERVER] Introduce ignoreAllocErrorsSimon Rettberg2020-02-241-0/+3
| | | | | If enabled, a failed fallocate will not abort image replication, but retry with sparse mode.
* [SERVER] Introduce autoFreeDiskSpaceDelaySimon Rettberg2019-09-051-0/+12
| | | | | | | | 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.
* [SERVER] Better lock debugging: Always check lock orderSimon Rettberg2019-08-071-1/+1
| | | | | | 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.
* i[SERVER] Include new pretendClient in config dumpv2.2Simon Rettberg2019-08-021-0/+1
|
* [SERVER] Turn all spinlocks into mutexesSimon Rettberg2019-07-261-3/+7
| | | | | | | | 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.
* [SERVER] Add pretendClient config optionSimon Rettberg2019-07-231-0/+2
| | | | | | 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.
* [SERVER] Fix compilation on clang (atomic vars)Simon Rettberg2018-07-101-4/+4
|
* [SERVER] Reload server config on SIGHUPSimon Rettberg2018-07-101-51/+75
| | | | | | | 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.
* [SERVER] Introduce backgroundReplication=hashblockSimon Rettberg2018-07-091-4/+16
| | | | | | | | 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.
* [SERVER] Add bgrMinClients: Thresold to control when BGR startsSimon Rettberg2018-04-121-2/+5
| | | | | Background replication will not kick in if there aren't at least that many clients connected.
* [SERVER] Option to disable timestamps on stdout/console (default: disabled)Simon Rettberg2018-04-111-1/+3
|
* [SERVER] Experimental support for sparse files in proxy modeSimon Rettberg2018-03-151-0/+7
| | | | | | | | | | | | 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.
* [SERVER] Check RLIMIT_NOFILE on startup and try to increase if requiredSimon Rettberg2017-11-081-0/+39
|
* [SERVER] Add multiple config options for limiting stuffSimon Rettberg2017-11-081-14/+146
| | | | | maxClients, maxImages, maxPayload, maxReplicationSize Refs #3231
* [SERVER] Support finer control over replication when a proxy connects to a proxySimon Rettberg2017-11-021-0/+2
| | | | | | | 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.
* [SERVER] Ignore invalid basePath in globals.c, do bailout in server.cSimon Rettberg2017-11-021-9/+12
|
* [SERVER] Split server-only defs from config.h to serverconfig.hSimon Rettberg2017-08-261-2/+4
|
* cleanup commitsSebastian2016-02-111-2/+0Star
|
* [SERVER] Remove non-working images from list, plus refactoringSimon Rettberg2015-12-151-0/+2
| | | | | | | | | | 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)
* [SERVER] Make listen port configurableSimon Rettberg2015-12-141-0/+10
|
* [SERVER] Update includes for moved log.hSimon Rettberg2015-12-021-1/+1
|
* [SERVER] Overhauled loggingSimon Rettberg2015-02-221-3/+29
| | | | | | - 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
* Get rid of unneccessary volatileSimon Rettberg2015-02-221-1/+1
| | | | Some minor debugging code, mostly commented out
* [SERVER] Crank up warning levels of gcc and fix them all (mostly sign ↵Simon Rettberg2015-01-141-1/+1
| | | | | | | 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.
* [SERVER] Get rid of epoll in alservers.c, make valgrind+gdb happy by ↵Simon Rettberg2015-01-061-1/+1
| | | | handling signals even though we block them
* [SERVER] Use stdbool.h for booleans; minor refactoring of variable and ↵Simon Rettberg2014-12-311-7/+7
| | | | function names
* [SERVER] Create compilation unit for wait/signalling logic (using eventfd)Simon Rettberg2014-12-311-1/+1
|
* [SERVER] Add setting to enable/disable background replication, add comments ↵Simon Rettberg2014-12-291-0/+2
| | | | to config and code
* [SERVER] Configurable client timeout, adaptive replication speed (to be ↵Simon Rettberg2014-12-221-0/+2
| | | | tested against varying bw/latency), retry sendfile call if ret <= len
* [SERVER] Minor tweaks here and thereSimon Rettberg2013-11-101-0/+2
|
* blaSimon Rettberg2013-11-071-0/+2
|
* [SERVER] Copy CRC-32 list from uplink server if availableSimon Rettberg2013-08-281-1/+3
| | | | | Split up helper.c, move file/disk related functions to fileutil.c Uplink: Make sure relayed requests are at least 1MiB
* [SERVER] several improvementsSimon Rettberg2013-08-021-0/+6
| | | | | | 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
* [SERVER] Fix create_image() by adding fallback solutions for fallocate()Simon Rettberg2013-08-011-1/+8
|
* [SERVER] Add command line options to create empty image of certain size with ↵Simon Rettberg2013-08-011-0/+29
| | | | empty cache map (so it needs an uplink server)
* Remove all glib dependencies from serversr2013-07-171-1/+1
|
* Add debug-lock functions that will helpt to spot deadlocks etc. while developingsr2013-07-161-0/+1
|
* Rewrite in progres....sr2013-07-091-0/+6