summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SERVER] Delete image files after releasing image to get rid of stale .map filesSimon Rettberg2018-03-191-7/+9
|
* [SERVER] image.c: Add size to RPC data, rename bytesReceived, always add ↵Simon Rettberg2018-03-191-7/+11
| | | | uplink if existent
* [SERVER] Increase read() block size when calculating CRC32Simon Rettberg2018-03-191-1/+1
|
* [SERVER] image_getCompletenessEstimate: Fix reversed logic in timeout checkSimon Rettberg2018-03-191-1/+3
|
* [SERVER] Fix int overflows on 32bit builds in CRC generationSimon Rettberg2018-03-162-7/+7
|
* [SERVER] Make sparse file mode actually workSimon Rettberg2018-03-163-9/+24
|
* [SERVER] Experimental support for sparse files in proxy modeSimon Rettberg2018-03-156-11/+69
| | | | | | | | | | | | 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] Make TSAN happySimon Rettberg2017-12-191-1/+3
|
* [SERVER] jansson < 2.6 compatSimon Rettberg2017-11-101-0/+5
|
* [SERVER] Check RLIMIT_NOFILE on startup and try to increase if requiredSimon Rettberg2017-11-081-0/+39
|
* [SERVER] altservers: Short timeout during RTT measurement, round request rangeSimon Rettberg2017-11-082-5/+10
| | | | | Rounding to 4k so caching works efficiently This should now close #3231
* [SERVER] rpc: Add q=logfile, q=altservers and q=config to /querySimon Rettberg2017-11-085-8/+77
|
* [SERVER] Add multiple config options for limiting stuffSimon Rettberg2017-11-087-20/+193
| | | | | maxClients, maxImages, maxPayload, maxReplicationSize Refs #3231
* [SERVER] altservers: Tweak, cleanup, refactor, renameSimon Rettberg2017-11-085-27/+40
|
* [SERVER] Properly clamp to 4k borders in updateCachemap()Simon Rettberg2017-11-071-2/+9
| | | | Refs #3231
* [SERVER] Use multiConnect() to find uplink for replicationSimon Rettberg2017-11-072-13/+38
| | | | | Just as in the fuse client, this will speed things up if we have several alt-servers in our list which are not reachable.
* [FUSE] Split final multiConnect-wait across multiple callsSimon Rettberg2017-11-071-8/+8
| | | | | | 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.
* [SHARED] Add log_hasMask() to check if a certain loglevel is setSimon Rettberg2017-11-072-0/+11
|
* [FUSE] Reset salen before getpeername() callSimon Rettberg2017-11-071-1/+2
|
* [FUSE] Make use of sock_multiConnect() for initial connectionSimon Rettberg2017-11-061-10/+36
| | | | | | 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.
* [SHARED] Add sockaddr2dnbd3 func, add multiConnect func, EINTR handlingSimon Rettberg2017-11-062-30/+141
| | | | | | | | | | 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.
* [FUSE] Remember up to 16 alt servers, but work only with 5Simon Rettberg2017-11-041-8/+59
| | | | | | | 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.
* [SERVER] Support finer control over replication when a proxy connects to a proxySimon Rettberg2017-11-027-4/+41
| | | | | | | 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.
* [FUSE] Fix printf warning for logadd callSimon Rettberg2017-11-021-1/+1
|
* [SERVER] Add --errormsg to only serve HTTP-JSON error codeSimon Rettberg2017-11-023-29/+65
| | | | | 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.
* [SERVER] Ignore invalid basePath in globals.c, do bailout in server.cSimon Rettberg2017-11-021-9/+12
|
* [SERVER] Clean up arguments, show version on startupSimon Rettberg2017-11-021-13/+8Star
|
* [SERVER] rpc: Keep track of and cap number of active http sessionsSimon Rettberg2017-11-011-11/+57
|
* [SERVER] rpc: Remove old TODO, set thread name for persistent connectionsSimon Rettberg2017-11-011-1/+5
|
* [SERVER] Since fuse client assumed no backwards compat before v3, lie to clientsSimon Rettberg2017-11-011-1/+1
| | | | | | 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. :(
* [FUSE] Improve log messages a bitSimon Rettberg2017-11-011-2/+5
|
* [*] Mark logadd() as printf-style function, fix errors that it revealedSimon Rettberg2017-10-317-11/+13
| | | | ...there were quite a few format string errors as it turns out :/
* [SERVER] net.c: Refactoring and renamingSimon Rettberg2017-10-311-58/+33Star
| | | | | | Less copy & paste for sendfile alternatives, changed naming of old dnbd3_* functions moved over from server.c a while ago.
* [SERVER] Image list private to image.cSimon Rettberg2017-10-312-5/+2Star
|
* [SERVER] rpc: encoding of our reply is utf-8, add to reply headerSimon Rettberg2017-10-301-1/+1
|
* [SERVER] Add AFL supportSimon Rettberg2017-10-307-4/+101
| | | | | | | | | | | 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/
* [SERVER] Missed occurence of AF_INET(6) -> HOST_IP[46]Simon Rettberg2017-10-301-3/+6
|
* [BENCH] Fix compileSimon Rettberg2017-10-301-0/+1
|
* [SERVER] rpc: Honor client's Connection header, add some commentsSimon Rettberg2017-10-301-35/+106
|
* [SERVER] Don't send error 500 to client on local connection timeoutSimon Rettberg2017-10-301-1/+3
|
* [*] Introduce constants for IPv4/6 in dnbd3_host_tSimon Rettberg2017-10-2810-46/+52
| | | | | | | 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.
* [SERVER] Add function to parse x-www-form-urlencoded stringsSimon Rettberg2017-10-284-26/+126
| | | | | | 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, ...)
* [SERVER] Use picohttpparser from h2oSimon Rettberg2017-10-265-49/+885
| | | | | | | 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.
* [SERVER] net: Simplify check for HTTPSimon Rettberg2017-10-261-10/+11
| | | | | Pretty loose guesswork, but preventing the false positives would not lead to any meaningful result anyways, so why bother.
* [SERVER] Rename missing occurence of ret, possibly leading to infinite loop :(Simon Rettberg2017-10-261-1/+1
|
* [SERVER] uplink: Fix updating of global byte counter, fix incremental updatesSimon Rettberg2017-10-251-2/+7
| | | | | Incremental updating of the global byte counter would only work when background replication is disabled. Fix this.
* [SERVER] Only start reloading images if no other reload is in progressSimon Rettberg2017-10-252-5/+13
|
* [SERVER] Improve handling of byte stats countersSimon Rettberg2017-10-253-19/+29
| | | | Less writes to variables, more up-to-date values for uplinks.
* [SERVER] Improve altserver handling and selectionSimon Rettberg2017-10-251-26/+41
| | | | | | 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.
* [FUSE] Cache signalfd instances used in fuse read handlerSimon Rettberg2017-10-241-2/+43
| | | | | | 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.