summaryrefslogtreecommitdiffstats
path: root/src/server/server.c
Commit message (Collapse)AuthorAgeFilesLines
* [KERNEL] Removes duplicate word 'of' in license headersManuel Bentele2021-04-161-1/+1
|
* [BUILD] Include branch and build timestamp in binariesSimon Rettberg2020-12-021-3/+5
|
* [SERVER] replaced non-existent FUSE define to match CMake's build definesManuel Bentele2020-11-271-3/+3
|
* [BUILD] add CMake targets to build binary and source packages with CPackManuel Bentele2020-10-221-4/+5
| | | | | | | | | | | This patch adds the following CMake targets - package - source to build bundeled packages. Those packages contain either all built binary artifacts or all source files for source code distribution. Both CMake targets are available in Release build configuration.
* [BUILD] add option to build the dnbd3-server with afl-fuzz supportManuel Bentele2020-10-201-5/+12
| | | | | The afl-fuzz support for the dnbd3-server requires an AFL C compiler like afl-gcc and can be enabled with the CMake option DNBD3_SERVER_AFL.
* [BUILD] set build type and stop Release build if repository is dirtyManuel Bentele2020-10-191-5/+5
|
* [BUILD] rewrite CMake build system to track changes of source filesManuel Bentele2020-10-161-9/+9
| | | | | | | | | | 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] FUSE: Fix arguments to fuseSimon Rettberg2020-07-301-1/+1
|
* [SERVER] Fix: Missing argument to fprintf()Simon Rettberg2020-07-301-1/+1
|
* [SERVER] Add FUSE modeSimon Rettberg2020-07-281-5/+27
| | | | | Still needs some cleanup and optimizations, variable naming sucks, comments, etc.
* [SERVER] Add name param to threadpool_runSimon Rettberg2020-03-191-3/+3
|
* [SERVER] Include build type and version in RPCSimon Rettberg2020-03-171-2/+5
| | | | Added new query type q=version, which uses the STATS access rights.
* [SERVER] Handle "warn unused result" casesSimon Rettberg2020-03-061-1/+4
|
* [SERVER] Make signal handling more POSIXSimon Rettberg2019-08-281-5/+17
| | | | | | | | | | | | | | | 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] Add timer infrastructureSimon Rettberg2019-08-271-9/+133
| | | | To be used by "close unused fd" checks, and others...
* [SERVER] Fix warnings, simplify lockingSimon Rettberg2019-08-261-1/+1
|
* [SERVER] Get rid of alt-servers thread, per-uplink rtt historySimon Rettberg2019-08-221-3/+5
| | | | | | | | | | 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] Better lock debugging: Always check lock orderSimon Rettberg2019-08-071-7/+0Star
| | | | | | 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] Reload server config on SIGHUPSimon Rettberg2018-07-101-0/+1
| | | | | | | 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] Refactor uplink/cache handling, improve crc checkingSimon Rettberg2018-07-041-1/+1
| | | | | | | | | | | | | The cacheFd is now moved to the uplink data structure and will only be handled by the uplink thread. The integrity checker now supports checking all blocks of an image. This will be triggered automatically whenever a check for a single block failed. Also, if a crc check on startup fails, the image won't be discarded anymore, but rather a full check will be initiated. Furthermore, when calling image_updateCacheMap() on an image that was previously complete, the cache map will now be re-initialized, and a new uplink connection created.
* [SERVER] Print info about signal senderSimon Rettberg2018-05-031-5/+46
|
* [SERVER] Proper exit code and message when shutting down due to error or signalSimon Rettberg2018-04-271-2/+6
|
* [SERVER] Ignore SIGPIPESimon Rettberg2018-04-101-0/+1
|
* [SERVER] Add --errormsg to only serve HTTP-JSON error codeSimon Rettberg2017-11-021-29/+51
| | | | | 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] Clean up arguments, show version on startupSimon Rettberg2017-11-021-13/+8Star
|
* [SERVER] Add AFL supportSimon Rettberg2017-10-301-3/+36
| | | | | | | | | | | 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
|
* [SERVER] Fix types or add explicit casts everywhere we might have type ↵Simon Rettberg2017-10-241-1/+1
| | | | conversion problems
* [SERVER] Use monotonic clock for measuring timeSimon Rettberg2017-10-191-4/+8
| | | | | Introduces new shared source unit timing.[ch] Closes #3214
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-071-125/+15Star
|
* [SERVER] Fix formattingSimon Rettberg2016-03-221-15/+15
|
* dnbd3server build success on freebsd :)Sebastian2016-02-111-10/+15
|
* cleanup commitsSebastian2016-02-111-18/+10Star
|
* [SERVER] Fix a lot of (mostly harmless) data racesSimon Rettberg2016-01-111-7/+6Star
|
* [SERVER] Cancel scanning of image dir if _shutdown is setSimon Rettberg2015-12-161-2/+4
| | | | So you can cancel image loading on startup via Ctrl-C
* [SERVER] More fine grained locking for RPC; better error loggingSimon Rettberg2015-12-161-1/+6
|
* [SERVER] Make listen port configurableSimon Rettberg2015-12-141-1/+1
|
* [SERVER] Free memory on exit to get new valgrind high scoreSimon Rettberg2015-12-141-1/+4
|
* [SERVER] Update includes for moved log.hSimon Rettberg2015-12-021-1/+1
|
* [FUSE] Mid-refactoring, does not compileSimon Rettberg2015-11-241-1/+1
|
* [SERVER] Reload images in another thread when triggered by signalSimon Rettberg2015-05-121-6/+12
| | | | | | | The server used to reload all images on the main thread, which is also responsible for accepting connections. While reloading the list, no new connections were accepted, which lead to clients marking the server as bad during their RTT measurements, then switching away from it.
* [Server] Added statistics of images and uptime to json.Stephan Schwaer2015-05-051-1/+0Star
|
* Removed dnbd3_printClients, added clients to statistics json in rpc.Stephan Schwaer2015-05-041-15/+0Star
|
* [SERVER] Added counters for received and sent bytes.Stephan Schwaer2015-04-271-1/+3
|
* [SERVER] printf -> logadd, make USR2 trigger a log cycle, remove old fake ↵Simon Rettberg2015-02-231-34/+20Star
| | | | delay feature
* [SERVER] Overhauled loggingSimon Rettberg2015-02-221-21/+18Star
| | | | | | - 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
* [SERVER] Set client connection timeout in client threadSimon Rettberg2015-01-071-2/+0Star
|
* [SERVER] Big code cleanup, refactoring, minor bugfixingSimon Rettberg2015-01-061-52/+51Star
|
* [SERVER] Use a thread pool for client connectionsSimon Rettberg2015-01-051-7/+7
|
* [SERVER] Use stdbool.h for booleans; minor refactoring of variable and ↵Simon Rettberg2014-12-311-15/+15
| | | | function names