summaryrefslogtreecommitdiffstats
path: root/src/server/image.h
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] Refactor uplink/cache handling, improve crc checkingSimon Rettberg2018-07-041-4/+2Star
| | | | | | | | | | | | | 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] Try to re-open cacheFd if writing failsSimon Rettberg2018-06-251-0/+2
| | | | | | | In scenarios where the proxy is using an NFS server as storage (for whatever crazy reason) or when the cacheFd goes bad through e.g. a switchroot, try to re-open it instead of just disabling caching forever.
* [SERVER] Make sure image has read fd before readingSimon Rettberg2018-06-131-0/+2
|
* [SERVER] Experimental support for sparse files in proxy modeSimon Rettberg2018-03-151-0/+2
| | | | | | | | | | | | 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] Image list private to image.cSimon Rettberg2017-10-311-3/+0Star
|
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-071-2/+3
|
* [SERVER] Implement closeUnusedFd config optionSimon Rettberg2017-09-021-0/+2
| | | | | | | 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.
* [SERVER] Split server-only defs from config.h to serverconfig.hSimon Rettberg2017-08-261-2/+1Star
|
* cleanup commitsSebastian2016-02-111-3/+2Star
|
* [SERVER] Performance: Optimized some functions (gprof)Simon Rettberg2015-12-171-1/+1
| | | | | | | 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] Support looking on disk if an unknown image is requestedSimon Rettberg2015-12-121-1/+1
|
* [SERVER] Reload images in another thread when triggered by signalSimon Rettberg2015-05-121-1/+2
| | | | | | | 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] Renamed image_fillJson to image_getListAsJson.Stephan Schwaer2015-05-081-1/+1
|
* [Server] Added statistics of images and uptime to json.Stephan Schwaer2015-05-051-1/+3
|
* [SERVER] Fix automatic proxying to use supplied connection; fix race ↵Simon Rettberg2015-01-271-1/+1
| | | | condition in uplink_init
* [SERVER] Big code cleanup, refactoring, minor bugfixingSimon Rettberg2015-01-061-2/+2
|
* [SERVER] Use stdbool.h for booleans; minor refactoring of variable and ↵Simon Rettberg2014-12-311-7/+7
| | | | function names
* Improve uplink handling, add code to debug thread creation/destruction, ↵Simon Rettberg2014-06-161-1/+1
| | | | change stupid convention of freeDiskSpace returning 0 on error, which is ambiguous to the disk simply being full...
* [SERVER] Save cache maps every 30 minsSimon Rettberg2013-11-121-0/+2
|
* [SERVER] More debugging, more safety checks, disable alt servers that fail ↵Simon Rettberg2013-09-161-0/+4
| | | | too often
* [SERVER] On-the-fly transparent proxyingSimon Rettberg2013-08-261-0/+2
|
* [SERVER] Improve proxy mode, implement integrity check in proxy modeSimon Rettberg2013-08-121-0/+4
|
* [SERVER] Fix use-after-free, improve cleanupSimon Rettberg2013-08-021-5/+7
|
* [SERVER] Some sanity here and there, minor fixes, trying to track down proxy ↵Simon Rettberg2013-08-021-0/+2
| | | | corruption
* [SERVER] Add command line options to create empty image of certain size with ↵Simon Rettberg2013-08-011-1/+2
| | | | empty cache map (so it needs an uplink server)
* Work in progress: uplinksr2013-07-251-0/+15
|
* Implement CRC-32 list generation; fix quick CRC-32 check on image loadingsr2013-07-231-0/+1
|
* Remove all glib dependencies from serversr2013-07-171-0/+2
|
* "It's compiling!"sr2013-07-151-27/+2Star
|
* Rewriiiiiiiiitesr2013-07-151-0/+5
|
* Rewrite still in progres....sr2013-07-111-1/+26
|
* Rewrite in progres....sr2013-07-091-0/+10
|
* Rewriting....sr2013-07-081-0/+8