summaryrefslogtreecommitdiffstats
path: root/src/server
Commit message (Collapse)AuthorAgeFilesLines
* [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-264-48/+884
| | | | | | | 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] 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-251-4/+12
|
* [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.
* [SERVER] Initialize PRNGSimon Rettberg2017-10-242-0/+2
|
* [SERVER] Get rid of zlib dependencySimon Rettberg2017-10-242-19/+19
| | | | | | We only used it for CRC-32, so now the source tree includes a stripped down version of the crc32 code from the zlib project.
* [SERVER] Fix types or add explicit casts everywhere we might have type ↵Simon Rettberg2017-10-249-85/+91
| | | | conversion problems
* [SERVER] Mute signedness warning on 32bitSimon Rettberg2017-10-201-2/+2
|
* [SERVER] Use monotonic clock for measuring timeSimon Rettberg2017-10-198-74/+104
| | | | | Introduces new shared source unit timing.[ch] Closes #3214
* [SERVER] More tweaks to alt-server selection wrt proxy cyclesSimon Rettberg2017-10-181-4/+9
| | | | | This needs an overhaul; status needs to be moved from global alt-servers list to individual uplinks
* [SERVER] Don't try to load metadata files as images; fix clang-analyzer ↵Simon Rettberg2017-10-182-15/+36
| | | | false positives
* [SERVER] Try to connect to different server if proxy cycle is detectedSimon Rettberg2017-10-173-9/+33
|
* [*] Support hop-counting in request header, protocol version 3Simon Rettberg2017-10-176-34/+62
| | | | | | | | | | | | | | We steal 8 bits from the request offset to count hops when requests get relayed by proxies. This still leaves plenty of bits for the offset (56 bits, supporting images of up to 72 petabytes). This is used to detect proxy cycles. The algorithm is not perfect but should prevent endless relays of the same request. This is backwards compatible to old clients and servers, as the server only ever sets the hopcount in relayed requests if the upstream server is using protocol version 3 or newer, and clients are automatically upwards compatible as there is practically no image larger than 74PB, so the newly introduced hop count field is always 0 even in requests from old clients.
* [SERVER] rpc: Support querying storage size + available spaceSimon Rettberg2017-10-114-9/+27
|
* [SERVER] Fix invalid pointer derefSimon Rettberg2017-10-061-1/+1
|
* [SERVER] rpc: Return a unique id generated at startup with each replySimon Rettberg2017-10-061-4/+19
|
* [SERVER] Return client count when requesting stats but not client listSimon Rettberg2017-10-062-4/+14
|
* [SERVER] rpc: Fix bitmask calc for odd subnet sizes (not 8, 16, ...)Simon Rettberg2017-10-041-1/+1
|
* [SERVER] How about updating atime on connect?Simon Rettberg2017-10-041-0/+3
|
* [SERVER] Implement HTTP RPC that supports different queries and ACLSimon Rettberg2017-10-014-44/+263
| | | | | | | | | - ACL is defined in new file rpc.acl - Queries are still WIP, for now something like /query?q=stats&q=images /query?q=clients works, although the parsing is still ugly - Also supports HTTP keep-alive
* [SERVER] Move includes from header to source unitSimon Rettberg2017-10-012-2/+2
|
* [SERVER] Helper function for loading line based space separated data from fileSimon Rettberg2017-10-013-34/+63
|
* [SERVER] Fix closing timeout reset, fix log messagesSimon Rettberg2017-09-082-1/+5
|
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-078-247/+290
|
* [SERVER] Implement closeUnusedFd config optionSimon Rettberg2017-09-023-0/+33
| | | | | | | This will close the readFd of images that have no active clients after some idle period (1 hour currently). Prevents deleted images from taking up space until the server is shut down.
* [*] Continue splitting #defines to clientconfig.h etc.Simon Rettberg2017-09-023-41/+2Star
|
* [SERVER] Split server-only defs from config.h to serverconfig.hSimon Rettberg2017-08-267-7/+54
|
* [SERVER] Change handling of nonworking images, check for size changeSimon Rettberg2017-08-241-77/+169
|
* [SERVER] Fix status query on big endianSimon Rettberg2017-08-211-4/+7
|
* [SERVER] Make crclist handling endian-safeSimon Rettberg2017-04-272-1/+9
|
* [SERVER] Remove stray lineSimon Rettberg2017-04-271-1/+0Star
|
* [SERVER] Fix image_load aswell...Simon Rettberg2016-11-091-12/+12
|
* [SERVER] Fix loading of rid-based images in vmdk legacy modeSimon Rettberg2016-11-091-9/+8Star
|
* [SERVER] Bump debug lock tracking limitsSimon Rettberg2016-07-131-2/+2
|
* [SERVER] Fix formattingSimon Rettberg2016-03-227-54/+55
|
* [SERVER] (FreeBSD) Unlock send mutex on sendfile errorSimon Rettberg2016-03-221-0/+1
|
* running FreeBSD sendfileSebastian2016-02-111-13/+36
|
* dnbd3server build success on freebsd :)Sebastian2016-02-117-27/+56
|
* cleanup commitsSebastian2016-02-1117-121/+39Star
|
* [SHARED] signal.h -> fdsignal.hSimon Rettberg2016-02-106-6/+6
|
* First steps in make signals more abstract from the underlying mechanism; ↵Simon Rettberg2016-02-055-96/+71Star
| | | | | | | | | | replace epoll with poll. We now don't assume that a signal equals a single fd (eventfd on Linux). The next step would be to create a version of signal.c that uses a pipe internally, so it can be used on other platforms, like *BSD. This is also the reason epoll was replaced with poll in uplink.c
* [SERVER] BREAKING: Get rid of pseudo case-insensitivityv2.1Simon Rettberg2016-02-018-52/+39Star
| | | | | | | | | | This was a wrong decision made long time ago, and it's broken in certain scenarios (eg. two servers serving from same NFS mount). Also it's of limited use anyways since it only supportes ASCII and would ignore umlauts, so blöd and BLÖD would still be considered two different images. So if you relied on this "feature" in any way, be careful when updating.
* [SERVER] Fix a lot of (mostly harmless) data racesSimon Rettberg2016-01-1111-90/+159
|
* [SERVER] Performance: Optimized some functions (gprof)Simon Rettberg2015-12-174-25/+45
| | | | | | | A run with gprof revealed that background replication is a huge CPU hog. The block selection was very slow and has been improved a lot. Minor improvements were made to other functions that scan the cache map of an image and are thus relatively slow.
* [SERVER] image_markComplete now handles locking so we remove() unlockedSimon Rettberg2015-12-172-15/+18
|
* [SERVER] Cancel scanning of image dir if _shutdown is setSimon Rettberg2015-12-162-4/+8
| | | | So you can cancel image loading on startup via Ctrl-C
* [SERVER] Fix image_calcBlockCrc32: Use 64bit for fileSize paramSimon Rettberg2015-12-161-22/+27
| | | | Using uint32_t for fileSize is not too clever :(