summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] rpc: Fix warningsSimon Rettberg2019-09-111-2/+2
|
* [*] Use __attribute__((packed)) instead of #pragma packSimon Rettberg2019-09-111-15/+5Star
|
* [SERVER] Make buffer when reading for crc check largerSimon Rettberg2019-09-111-1/+1
|
* [SERVER] Make integrity checks on startup asyncSimon Rettberg2019-09-103-31/+37
|
* Fix compilation on older gccSimon Rettberg2019-09-091-2/+2
|
* [SERVER] Fix warning on clangSimon Rettberg2019-09-071-6/+1Star
|
* [SERVER] picohttpparser: Merge 81fe3d99fd90a55cafb993e53fd3000dbc4d564cSimon Rettberg2019-09-071-21/+46
|
* [SERVER] rpc: Add cachemap featureSimon Rettberg2019-09-064-1/+63
|
* [SERVER] Introduce autoFreeDiskSpaceDelaySimon Rettberg2019-09-053-6/+27
| | | | | | | | 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] integrity checker: Improve flushing logicSimon Rettberg2019-09-052-90/+111
|
* [SERVER] Support limiting alt-servers to specific namespaceSimon Rettberg2019-09-045-18/+49
| | | | | | Not really namespace but simple string matching for the image path. Path is matched from start with no support for glob or regex, so usually you want to have a trailing '/' to limit to certain directories.
* [SERVER] Fix altservers_getListForClient()Simon Rettberg2019-09-043-6/+66
| | | | | The score wasn't reset when adding clients to the list, resulting in exactly one server filling up the whole list.
* [SERVER] Fix indentationSimon Rettberg2019-09-031-4/+4
|
* [SERVER] Fix image_updateCachemap()Simon Rettberg2019-09-031-4/+8
|
* [SERVER] Move signal init to uplink_initSimon Rettberg2019-09-021-10/+11
| | | | | | | Initializing the signal in the thread lead to a race where we would init the uplink and queue a request for it before the thread actually initialized it. This was not harmful but lead to spurious warnings in the server's log.
* [SERVER] uplink: Don't disable already disabled imageSimon Rettberg2019-09-021-1/+1
|
* [SERVER] Fix compiler warningsSimon Rettberg2019-09-023-5/+5
|
* [SERVER] uplink: Don't reinit uplink when freeing itSimon Rettberg2019-09-021-13/+3Star
|
* [SERVER] Less debug spam, fix RTT interval calculationSimon Rettberg2019-08-301-3/+5
|
* [SERVER] Introduce debug spamSimon Rettberg2019-08-302-9/+9
|
* [SERVER] No uplink_init when checking working state; improve loggingSimon Rettberg2019-08-302-8/+11
|
* [SERVER] Tear down whole uplink on idle timeoutSimon Rettberg2019-08-292-29/+24Star
| | | | | | Keeping the uplink thread around forever even though we disconnected from the upstream server seems wasteful. Get rid of this and rear down the uplink entirely.
* [SERVER] Use weakref for cache mapsSimon Rettberg2019-08-297-160/+220
| | | | | | Gets rid of a bunch of locking, especially the hot path in net.c where clients are requesting data. Many clients unsing the same incomplete image previously created a bottleneck here.
* [SERVER] reference: Fix error msg usageSimon Rettberg2019-08-292-2/+2
|
* [BENCH] Request random blocksSimon Rettberg2019-08-292-3/+4
|
* [SERVER] Speed up shutdown of integrity checkerSimon Rettberg2019-08-281-2/+5
|
* [SERVER] Reintroduce check whether readFd is actually != -1Simon Rettberg2019-08-281-1/+3
|
* Merge branch 'master' into atomicSimon Rettberg2019-08-281-2/+2
|\
| * [FUSE] Increase socket timeout from 1 to 3 secondsSimon Rettberg2019-08-281-2/+2
| |
* | [SERVER] Make signal handling more POSIXSimon Rettberg2019-08-288-33/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to POSIX, a signal sent to a PID can be delivered to an arbitrary thread of that process that hasn't the signal blocked. This seens to never happen on Linux, but would mess things up since the code expected the main signal handler to only be executed by the main thread. This should now be fixed by examining the destination PID of the signal as well as the ID of the thread currently running the signal handler. If we notice the signal wasn't sent by our own PID and the handler is not currently run by the main thread, we re-send the signal to the main thread. Otherwise, if the signal was sent by our own PID but the handler is not run in the main thread, do nothing. This way we can use pthread_kill() to wake up threads that might be stuck in a blocking syscall when it's time to shut down.
* | [SERVER] Remove old commentsSimon Rettberg2019-08-282-38/+0Star
| |
* | [SERVER] Handle closeUnusedFd via timerSimon Rettberg2019-08-282-25/+19Star
| |
* | [SERVER] Add timer infrastructureSimon Rettberg2019-08-272-10/+134
| | | | | | | | To be used by "close unused fd" checks, and others...
* | [SERVER] Fix swapped assignmentSimon Rettberg2019-08-271-1/+1
| |
* | [SERVER] Use reference counting for uplinkSimon Rettberg2019-08-2711-140/+311
| | | | | | | | First step towards less locking for proxy mode
* | [SERVER] Fix warnings, simplify lockingSimon Rettberg2019-08-262-12/+13
| |
* | [BENCH] Check CMD_GET_BLOCK reply cmd typeSimon Rettberg2019-08-231-0/+3
| |
* | [SERVER] Get rid of alt-servers thread, per-uplink rtt historySimon Rettberg2019-08-229-485/+469Star
| | | | | | | | | | | | | | | | | | | | Alt-Server checks are now run using the threadpool, so we don't need a queue and dedicated thread anymore. The rtt history is now kept per uplink, so many uplinks won't overwhelm the history, making its time window very short. Also the fail counter is now split up; a global one for when the server actually isn't reachable, a local (per-uplink) one for when the server is reachable but doesn't serve the requested image.
* | [SERVER] Put request handle into CMD_ERROR replySimon Rettberg2019-08-221-1/+1
| |
* | [SERVER] Add struct representing active connection to uplink serverSimon Rettberg2019-08-185-66/+60Star
| |
* | [SERVER] uplink: More consistent type/variable namingSimon Rettberg2019-08-185-288/+294
| | | | | | | | | | * Change link to uplink everywhere * dnbd3_connection_t -> dnbd3_uplink_t
* | [SERVER] altservers: Don't run check if <= 1 alt server availableSimon Rettberg2019-08-181-4/+11
| |
* | [SERVER] net.c: Minor reorderingSimon Rettberg2019-08-181-8/+9
| |
* | [SERVER] Lock free thread poolSimon Rettberg2019-08-161-53/+57
| |
* | [SHARED] Better errno handling in connect() helperSimon Rettberg2019-08-151-0/+8
| |
* | [SERVER] Better lock debugging: Always check lock orderSimon Rettberg2019-08-0710-219/+192Star
| | | | | | | | | | | | 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.
* | [SERVER] Lock-free queue for altservers check threadSimon Rettberg2019-08-072-48/+57
| |
* | [BENCH] Allow specifying request block sizeSimon Rettberg2019-08-074-19/+32
| |
* | [SERVER] Use more _AtomicSimon Rettberg2019-08-072-5/+4Star
| |
* | [SERVER] Fix race condition and invalid lock orderSimon Rettberg2019-08-071-4/+7
| |