Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | [SERVER] Delete image files after releasing image to get rid of stale .map files | Simon Rettberg | 2018-03-19 | 1 | -7/+9 | |
| | ||||||
* | [SERVER] image.c: Add size to RPC data, rename bytesReceived, always add ↵ | Simon Rettberg | 2018-03-19 | 1 | -7/+11 | |
| | | | | uplink if existent | |||||
* | [SERVER] Increase read() block size when calculating CRC32 | Simon Rettberg | 2018-03-19 | 1 | -1/+1 | |
| | ||||||
* | [SERVER] image_getCompletenessEstimate: Fix reversed logic in timeout check | Simon Rettberg | 2018-03-19 | 1 | -1/+3 | |
| | ||||||
* | [SERVER] Fix int overflows on 32bit builds in CRC generation | Simon Rettberg | 2018-03-16 | 2 | -7/+7 | |
| | ||||||
* | [SERVER] Make sparse file mode actually work | Simon Rettberg | 2018-03-16 | 3 | -9/+24 | |
| | ||||||
* | [SERVER] Experimental support for sparse files in proxy mode | Simon Rettberg | 2018-03-15 | 6 | -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 happy | Simon Rettberg | 2017-12-19 | 1 | -1/+3 | |
| | ||||||
* | [SERVER] jansson < 2.6 compat | Simon Rettberg | 2017-11-10 | 1 | -0/+5 | |
| | ||||||
* | [SERVER] Check RLIMIT_NOFILE on startup and try to increase if required | Simon Rettberg | 2017-11-08 | 1 | -0/+39 | |
| | ||||||
* | [SERVER] altservers: Short timeout during RTT measurement, round request range | Simon Rettberg | 2017-11-08 | 2 | -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 /query | Simon Rettberg | 2017-11-08 | 5 | -8/+77 | |
| | ||||||
* | [SERVER] Add multiple config options for limiting stuff | Simon Rettberg | 2017-11-08 | 7 | -20/+193 | |
| | | | | | maxClients, maxImages, maxPayload, maxReplicationSize Refs #3231 | |||||
* | [SERVER] altservers: Tweak, cleanup, refactor, rename | Simon Rettberg | 2017-11-08 | 5 | -27/+40 | |
| | ||||||
* | [SERVER] Properly clamp to 4k borders in updateCachemap() | Simon Rettberg | 2017-11-07 | 1 | -2/+9 | |
| | | | | Refs #3231 | |||||
* | [SERVER] Use multiConnect() to find uplink for replication | Simon Rettberg | 2017-11-07 | 2 | -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 calls | Simon Rettberg | 2017-11-07 | 1 | -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 set | Simon Rettberg | 2017-11-07 | 2 | -0/+11 | |
| | ||||||
* | [FUSE] Reset salen before getpeername() call | Simon Rettberg | 2017-11-07 | 1 | -1/+2 | |
| | ||||||
* | [FUSE] Make use of sock_multiConnect() for initial connection | Simon Rettberg | 2017-11-06 | 1 | -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 handling | Simon Rettberg | 2017-11-06 | 2 | -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 5 | Simon Rettberg | 2017-11-04 | 1 | -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 proxy | Simon Rettberg | 2017-11-02 | 7 | -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 call | Simon Rettberg | 2017-11-02 | 1 | -1/+1 | |
| | ||||||
* | [SERVER] Add --errormsg to only serve HTTP-JSON error code | Simon Rettberg | 2017-11-02 | 3 | -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.c | Simon Rettberg | 2017-11-02 | 1 | -9/+12 | |
| | ||||||
* | [SERVER] Clean up arguments, show version on startup | Simon Rettberg | 2017-11-02 | 1 | -13/+8 | |
| | ||||||
* | [SERVER] rpc: Keep track of and cap number of active http sessions | Simon Rettberg | 2017-11-01 | 1 | -11/+57 | |
| | ||||||
* | [SERVER] rpc: Remove old TODO, set thread name for persistent connections | Simon Rettberg | 2017-11-01 | 1 | -1/+5 | |
| | ||||||
* | [SERVER] Since fuse client assumed no backwards compat before v3, lie to clients | Simon Rettberg | 2017-11-01 | 1 | -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 bit | Simon Rettberg | 2017-11-01 | 1 | -2/+5 | |
| | ||||||
* | [*] Mark logadd() as printf-style function, fix errors that it revealed | Simon Rettberg | 2017-10-31 | 7 | -11/+13 | |
| | | | | ...there were quite a few format string errors as it turns out :/ | |||||
* | [SERVER] net.c: Refactoring and renaming | Simon Rettberg | 2017-10-31 | 1 | -58/+33 | |
| | | | | | | 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.c | Simon Rettberg | 2017-10-31 | 2 | -5/+2 | |
| | ||||||
* | [SERVER] rpc: encoding of our reply is utf-8, add to reply header | Simon Rettberg | 2017-10-30 | 1 | -1/+1 | |
| | ||||||
* | [SERVER] Add AFL support | Simon Rettberg | 2017-10-30 | 7 | -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 Rettberg | 2017-10-30 | 1 | -3/+6 | |
| | ||||||
* | [BENCH] Fix compile | Simon Rettberg | 2017-10-30 | 1 | -0/+1 | |
| | ||||||
* | [SERVER] rpc: Honor client's Connection header, add some comments | Simon Rettberg | 2017-10-30 | 1 | -35/+106 | |
| | ||||||
* | [SERVER] Don't send error 500 to client on local connection timeout | Simon Rettberg | 2017-10-30 | 1 | -1/+3 | |
| | ||||||
* | [*] Introduce constants for IPv4/6 in dnbd3_host_t | Simon Rettberg | 2017-10-28 | 10 | -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 strings | Simon Rettberg | 2017-10-28 | 4 | -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 h2o | Simon Rettberg | 2017-10-26 | 5 | -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 HTTP | Simon Rettberg | 2017-10-26 | 1 | -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 Rettberg | 2017-10-26 | 1 | -1/+1 | |
| | ||||||
* | [SERVER] uplink: Fix updating of global byte counter, fix incremental updates | Simon Rettberg | 2017-10-25 | 1 | -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 progress | Simon Rettberg | 2017-10-25 | 2 | -5/+13 | |
| | ||||||
* | [SERVER] Improve handling of byte stats counters | Simon Rettberg | 2017-10-25 | 3 | -19/+29 | |
| | | | | Less writes to variables, more up-to-date values for uplinks. | |||||
* | [SERVER] Improve altserver handling and selection | Simon Rettberg | 2017-10-25 | 1 | -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 handler | Simon Rettberg | 2017-10-24 | 1 | -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. |