Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | [SERVER] Refactor uplink/cache handling, improve crc checking | Simon Rettberg | 2018-07-04 | 1 | -216/+73 | |
| | | | | | | | | | | | | | 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 fails | Simon Rettberg | 2018-06-25 | 1 | -1/+44 | |
| | | | | | | | 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 reading | Simon Rettberg | 2018-06-13 | 1 | -29/+52 | |
| | ||||||
* | [SERVER] Don't spam log in vmdkLegacyMode for unknown images | Simon Rettberg | 2018-05-02 | 1 | -3/+7 | |
| | ||||||
* | [SERVER] Fix deadlock on shutdown (via image_tryFreeAll) | Simon Rettberg | 2018-04-24 | 1 | -4/+8 | |
| | | | | | imageListLock was locked on twice in the call stack, which is bad if you're using non-recursive locks. | |||||
* | [SERVER] Mark spammy replication messages as DEBUG2 instead of 1 | Simon Rettberg | 2018-04-11 | 1 | -3/+3 | |
| | ||||||
* | [SERVER] Error handling and logging when saving cache map | Simon Rettberg | 2018-04-10 | 1 | -24/+37 | |
| | ||||||
* | [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 | 1 | -6/+6 | |
| | ||||||
* | [SERVER] Make sparse file mode actually work | Simon Rettberg | 2018-03-16 | 1 | -5/+12 | |
| | ||||||
* | [SERVER] Experimental support for sparse files in proxy mode | Simon Rettberg | 2018-03-15 | 1 | -10/+34 | |
| | | | | | | | | | | | | 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] Add multiple config options for limiting stuff | Simon Rettberg | 2017-11-08 | 1 | -2/+5 | |
| | | | | | maxClients, maxImages, maxPayload, maxReplicationSize Refs #3231 | |||||
* | [SERVER] altservers: Tweak, cleanup, refactor, rename | Simon Rettberg | 2017-11-08 | 1 | -1/+1 | |
| | ||||||
* | [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 | 1 | -12/+37 | |
| | | | | | Just as in the fuse client, this will speed things up if we have several alt-servers in our list which are not reachable. | |||||
* | [SERVER] Support finer control over replication when a proxy connects to a proxy | Simon Rettberg | 2017-11-02 | 1 | -1/+1 | |
| | | | | | | | 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. | |||||
* | [*] Mark logadd() as printf-style function, fix errors that it revealed | Simon Rettberg | 2017-10-31 | 1 | -1/+1 | |
| | | | | ...there were quite a few format string errors as it turns out :/ | |||||
* | [SERVER] Image list private to image.c | Simon Rettberg | 2017-10-31 | 1 | -2/+2 | |
| | ||||||
* | [SERVER] Only start reloading images if no other reload is in progress | Simon Rettberg | 2017-10-25 | 1 | -4/+12 | |
| | ||||||
* | [SERVER] Initialize PRNG | Simon Rettberg | 2017-10-24 | 1 | -0/+1 | |
| | ||||||
* | [SERVER] Get rid of zlib dependency | Simon Rettberg | 2017-10-24 | 1 | -16/+16 | |
| | | | | | | 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 Rettberg | 2017-10-24 | 1 | -40/+45 | |
| | | | | conversion problems | |||||
* | [SERVER] Use monotonic clock for measuring time | Simon Rettberg | 2017-10-19 | 1 | -19/+26 | |
| | | | | | Introduces new shared source unit timing.[ch] Closes #3214 | |||||
* | [SERVER] Don't try to load metadata files as images; fix clang-analyzer ↵ | Simon Rettberg | 2017-10-18 | 1 | -14/+35 | |
| | | | | false positives | |||||
* | [*] Support hop-counting in request header, protocol version 3 | Simon Rettberg | 2017-10-17 | 1 | -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 space | Simon Rettberg | 2017-10-11 | 1 | -3/+3 | |
| | ||||||
* | [SERVER] Fix closing timeout reset, fix log messages | Simon Rettberg | 2017-09-08 | 1 | -1/+4 | |
| | ||||||
* | [SERVER] Refactor: Move client list to net.* and isolate | Simon Rettberg | 2017-09-07 | 1 | -0/+1 | |
| | ||||||
* | [SERVER] Implement closeUnusedFd config option | Simon Rettberg | 2017-09-02 | 1 | -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 change | Simon Rettberg | 2017-08-24 | 1 | -77/+169 | |
| | ||||||
* | [SERVER] Make crclist handling endian-safe | Simon Rettberg | 2017-04-27 | 1 | -1/+8 | |
| | ||||||
* | [SERVER] Fix image_load aswell... | Simon Rettberg | 2016-11-09 | 1 | -12/+12 | |
| | ||||||
* | [SERVER] Fix loading of rid-based images in vmdk legacy mode | Simon Rettberg | 2016-11-09 | 1 | -9/+8 | |
| | ||||||
* | [SERVER] Fix formatting | Simon Rettberg | 2016-03-22 | 1 | -3/+3 | |
| | ||||||
* | dnbd3server build success on freebsd :) | Sebastian | 2016-02-11 | 1 | -12/+10 | |
| | ||||||
* | [SHARED] signal.h -> fdsignal.h | Simon Rettberg | 2016-02-10 | 1 | -1/+1 | |
| | ||||||
* | [SERVER] BREAKING: Get rid of pseudo case-insensitivityv2.1 | Simon Rettberg | 2016-02-01 | 1 | -17/+13 | |
| | | | | | | | | | | 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 races | Simon Rettberg | 2016-01-11 | 1 | -33/+46 | |
| | ||||||
* | [SERVER] Performance: Optimized some functions (gprof) | Simon Rettberg | 2015-12-17 | 1 | -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() unlocked | Simon Rettberg | 2015-12-17 | 1 | -7/+12 | |
| | ||||||
* | [SERVER] Cancel scanning of image dir if _shutdown is set | Simon Rettberg | 2015-12-16 | 1 | -2/+4 | |
| | | | | So you can cancel image loading on startup via Ctrl-C | |||||
* | [SERVER] Fix image_calcBlockCrc32: Use 64bit for fileSize param | Simon Rettberg | 2015-12-16 | 1 | -22/+27 | |
| | | | | Using uint32_t for fileSize is not too clever :( | |||||
* | [SERVER] More fine grained locking for RPC; better error logging | Simon Rettberg | 2015-12-16 | 1 | -13/+34 | |
| | ||||||
* | [SERVER] Update config example | Simon Rettberg | 2015-12-15 | 1 | -2/+6 | |
| | ||||||
* | [SERVER] Remove non-working images from list, plus refactoring | Simon Rettberg | 2015-12-15 | 1 | -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-demand | Simon Rettberg | 2015-12-14 | 1 | -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 requested | Simon Rettberg | 2015-12-12 | 1 | -21/+108 | |
| |