summaryrefslogtreecommitdiffstats
path: root/src/server/image.c
Commit message (Collapse)AuthorAgeFilesLines
...
* [SERVER] Don't try to load metadata files as images; fix clang-analyzer ↵Simon Rettberg2017-10-181-14/+35
| | | | false positives
* [*] Support hop-counting in request header, protocol version 3Simon Rettberg2017-10-171-3/+3
| | | | | | | | | | | | | | 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-111-3/+3
|
* [SERVER] Fix closing timeout reset, fix log messagesSimon Rettberg2017-09-081-1/+4
|
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-071-0/+1
|
* [SERVER] Implement closeUnusedFd config optionSimon Rettberg2017-09-021-0/+26
| | | | | | | 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] Change handling of nonworking images, check for size changeSimon Rettberg2017-08-241-77/+169
|
* [SERVER] Make crclist handling endian-safeSimon Rettberg2017-04-271-1/+8
|
* [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] Fix formattingSimon Rettberg2016-03-221-3/+3
|
* dnbd3server build success on freebsd :)Sebastian2016-02-111-12/+10Star
|
* [SHARED] signal.h -> fdsignal.hSimon Rettberg2016-02-101-1/+1
|
* [SERVER] BREAKING: Get rid of pseudo case-insensitivityv2.1Simon Rettberg2016-02-011-17/+13Star
| | | | | | | | | | 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-111-33/+46
|
* [SERVER] Performance: Optimized some functions (gprof)Simon Rettberg2015-12-171-7/+18
| | | | | | | 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-171-7/+12
|
* [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] Fix image_calcBlockCrc32: Use 64bit for fileSize paramSimon Rettberg2015-12-161-22/+27
| | | | Using uint32_t for fileSize is not too clever :(
* [SERVER] More fine grained locking for RPC; better error loggingSimon Rettberg2015-12-161-13/+34
|
* [SERVER] Update config exampleSimon Rettberg2015-12-151-2/+6
|
* [SERVER] Remove non-working images from list, plus refactoringSimon Rettberg2015-12-151-51/+175
| | | | | | | | | | Now that we can automatically load unknown images from disk on request, it makes sense to remove non-working images from the image list. On future requests, we will look for them on disk again, which is nice in case of temporary storage hickups. Also, some more ore less related locking has been refined (loading images, replicating images)
* [SERVER] Disallow images starting with "." now that we allow load-on-demandSimon Rettberg2015-12-141-1/+2
| | | | | This will prevent hidden files from being exported to clients and also prevents directory traversal attacks ( ../../image.img )
* [SERVER] Support looking on disk if an unknown image is requestedSimon Rettberg2015-12-121-21/+108
|
* [SERVER] Nullpad images virtually at runtime instead of padding the actual fileSimon Rettberg2015-12-101-152/+113Star
|
* [SERVER] Add missing nullptr check from refactoring, improve lockingSimon Rettberg2015-12-071-9/+11
|
* [SERVER] Update includes for moved log.hSimon Rettberg2015-12-021-1/+1
|
* [FUSE] Mid-refactoring, does not compileSimon Rettberg2015-11-241-1/+1
|
* [FUSE] Start refactoring so we can handle multithread fuseSimon Rettberg2015-11-211-2/+2
|
* [SERVER] Improve image related lockingSimon Rettberg2015-11-201-1/+7
|
* [SERVER] Check uplink server for newer revision than local if client ↵Simon Rettberg2015-11-111-15/+22
| | | | requests rid=0
* [SERVER] Reload images in another thread when triggered by signalSimon Rettberg2015-05-121-31/+48
| | | | | | | 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] Rename some more RPC fieldsSimon Rettberg2015-05-081-1/+1
|
* [SERVER] Add image ID for easier handling in RPC, export RID via RPC, make ↵Simon Rettberg2015-05-081-2/+5
| | | | names of the byte count fields in RPC consistent
* [Server] Added statistics of images and uptime to json.Stephan Schwaer2015-05-051-13/+12Star
|
* [FUSE] Integrate into cmake build processSimon Rettberg2015-04-241-1/+1
|
* [SERVER] printf -> logadd, make USR2 trigger a log cycle, remove old fake ↵Simon Rettberg2015-02-231-22/+23
| | | | delay feature
* [SERVER] Overhauled loggingSimon Rettberg2015-02-221-42/+42
| | | | | | - 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] Use shared file handle for readingSimon Rettberg2015-01-301-17/+15Star
|
* [SERVER] Implement proper keep alive for uplinksSimon Rettberg2015-01-281-10/+14
|
* [SERVER] Also fix fd leak if uplink_init failsSimon Rettberg2015-01-271-1/+1
|
* [SERVER] Fix automatic proxying to use supplied connection; fix race ↵Simon Rettberg2015-01-271-14/+16
| | | | condition in uplink_init
* [SERVER] Crank up warning levels of gcc and fix them all (mostly sign ↵Simon Rettberg2015-01-141-11/+12
| | | | | | | compare and some unused params) Also allow newline at end of alt-servers file without complaining about it not being a valid alt server definition.
* [SERVER] Big code cleanup, refactoring, minor bugfixingSimon Rettberg2015-01-061-34/+49
|
* [SERVER] Dead code removal, minor performance tweaks, refactoring, etc.Simon Rettberg2015-01-021-2/+2
|
* [SERVER] Use stdbool.h for booleans; minor refactoring of variable and ↵Simon Rettberg2014-12-311-98/+97Star
| | | | function names
* [SERVER] Improve replication and reconnecting behaviourSimon Rettberg2014-12-221-1/+1
|
* Improve uplink handling, add code to debug thread creation/destruction, ↵Simon Rettberg2014-06-161-9/+12
| | | | change stupid convention of freeDiskSpace returning 0 on error, which is ambiguous to the disk simply being full...
* Fixed the amazing infinite loop I introduced when refactoringSimon Rettberg2014-01-111-8/+18
|