Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [BUILD] rewrite CMake build system to track changes of source files | Manuel Bentele | 2020-10-16 | 1 | -7/+7 |
| | | | | | | | | | | 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] Add FUSE mode | Simon Rettberg | 2020-07-28 | 1 | -79/+67![]() |
| | | | | | Still needs some cleanup and optimizations, variable naming sucks, comments, etc. | ||||
* | [SERVER] Fix list walk when removing client from uplink | Simon Rettberg | 2020-06-10 | 1 | -1/+3 |
| | |||||
* | [SERVER] Fix warnings, add assertions | Simon Rettberg | 2020-03-20 | 1 | -6/+9 |
| | |||||
* | [SERVER] Add name param to threadpool_run | Simon Rettberg | 2020-03-19 | 1 | -1/+1 |
| | |||||
* | [SERVER] Make sure bgrWindowSize doesn't overwhelm uplink queue | Simon Rettberg | 2020-03-17 | 1 | -0/+2 |
| | |||||
* | [SERVER] Don't prefetch across hash blocks in BGS_HASHBLOCK mode | Simon Rettberg | 2020-03-17 | 1 | -5/+8 |
| | |||||
* | [SERVER] Remove uplink_ prefix from static (private) functions | Simon Rettberg | 2020-03-14 | 1 | -40/+40 |
| | |||||
* | [SERVER] Add comments, assert for uplink thread | Simon Rettberg | 2020-03-14 | 1 | -6/+20 |
| | |||||
* | [SERVER] Use image:rid in log messages | Simon Rettberg | 2020-03-14 | 1 | -5/+5 |
| | |||||
* | [SERVER] Check server version before setting hopCount field | Simon Rettberg | 2020-03-13 | 1 | -1/+1 |
| | |||||
* | [SERVER] Check and increase hopCount when adding uplink request | Simon Rettberg | 2020-03-13 | 1 | -4/+7 |
| | |||||
* | [SERVER] Rewrite uplink queue handling | Simon Rettberg | 2020-03-13 | 1 | -348/+423 |
| | | | | | | - Now uses linked lists instead of huge array - Does prefetch data on client requests - Can have multiple replication requests in-flight | ||||
* | [SERVER] Add printf macro for image (name:rid as %s:%d) | Simon Rettberg | 2020-03-06 | 1 | -10/+10 |
| | |||||
* | [SERVER] Handle "warn unused result" cases | Simon Rettberg | 2020-03-06 | 1 | -4/+10 |
| | |||||
* | [SERVER] Reload cache maps periodically for local images | Simon Rettberg | 2020-03-06 | 1 | -2/+8 |
| | | | | | | If an image is incomplete, but has no upstream server that can be used for replication, reload the cache map from disk periodically, in case some other server instance is writing to the image. | ||||
* | [SERVER] Add timer task for saving cache maps | Simon Rettberg | 2020-03-04 | 1 | -73/+3![]() |
| | | | | | | | | | Cache maps will now be saved periodically, but only if either they have a "dirty" bit set, which happens if any bits in the map get cleared again (due to corruption), or if new data has been replicated from an uplink server. This either means at least one byte received and 5 minutes have passed, or at least 500MB have been downloaded. The timer currently runs every 20 seconds. | ||||
* | [SERVER] Also add a flag for uplink queue overload | Simon Rettberg | 2020-03-03 | 1 | -0/+11 |
| | |||||
* | [SERVER] Remove "working" flag, introduce fine-grained flags | Simon Rettberg | 2020-03-03 | 1 | -38/+76 |
| | | | | | | | | Tracking the "working" state of images using one boolean is insufficient regarding the different ways in which providing an image can fail. Introduce separate flags for different conditions, like "file not readable", "file not writable", "no uplink server available", "file content has changed". | ||||
* | [SERVER] Fix warning on clang | Simon Rettberg | 2019-09-07 | 1 | -6/+1![]() |
| | |||||
* | [SERVER] integrity checker: Improve flushing logic | Simon Rettberg | 2019-09-05 | 1 | -1/+1 |
| | |||||
* | [SERVER] Move signal init to uplink_init | Simon Rettberg | 2019-09-02 | 1 | -10/+11 |
| | | | | | | | Initializing the signal in the thread lead to a race where we would init the uplink and queue a request for it before the thread actually initialized it. This was not harmful but lead to spurious warnings in the server's log. | ||||
* | [SERVER] uplink: Don't disable already disabled image | Simon Rettberg | 2019-09-02 | 1 | -1/+1 |
| | |||||
* | [SERVER] uplink: Don't reinit uplink when freeing it | Simon Rettberg | 2019-09-02 | 1 | -13/+3![]() |
| | |||||
* | [SERVER] Less debug spam, fix RTT interval calculation | Simon Rettberg | 2019-08-30 | 1 | -3/+5 |
| | |||||
* | [SERVER] Introduce debug spam | Simon Rettberg | 2019-08-30 | 1 | -8/+8 |
| | |||||
* | [SERVER] No uplink_init when checking working state; improve logging | Simon Rettberg | 2019-08-30 | 1 | -0/+1 |
| | |||||
* | [SERVER] Tear down whole uplink on idle timeout | Simon Rettberg | 2019-08-29 | 1 | -21/+19![]() |
| | | | | | | Keeping the uplink thread around forever even though we disconnected from the upstream server seems wasteful. Get rid of this and rear down the uplink entirely. | ||||
* | [SERVER] Use weakref for cache maps | Simon Rettberg | 2019-08-29 | 1 | -34/+30![]() |
| | | | | | | Gets rid of a bunch of locking, especially the hot path in net.c where clients are requesting data. Many clients unsing the same incomplete image previously created a bottleneck here. | ||||
* | [SERVER] Fix swapped assignment | Simon Rettberg | 2019-08-27 | 1 | -1/+1 |
| | |||||
* | [SERVER] Use reference counting for uplink | Simon Rettberg | 2019-08-27 | 1 | -88/+126 |
| | | | | First step towards less locking for proxy mode | ||||
* | [SERVER] Fix warnings, simplify locking | Simon Rettberg | 2019-08-26 | 1 | -11/+12 |
| | |||||
* | [SERVER] Get rid of alt-servers thread, per-uplink rtt history | Simon Rettberg | 2019-08-22 | 1 | -56/+61 |
| | | | | | | | | | | 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] Add struct representing active connection to uplink server | Simon Rettberg | 2019-08-18 | 1 | -40/+38![]() |
| | |||||
* | [SERVER] uplink: More consistent type/variable naming | Simon Rettberg | 2019-08-18 | 1 | -277/+277 |
| | | | | | * Change link to uplink everywhere * dnbd3_connection_t -> dnbd3_uplink_t | ||||
* | [SERVER] Better lock debugging: Always check lock order | Simon Rettberg | 2019-08-07 | 1 | -3/+3 |
| | | | | | | 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] Lock-free queue for altservers check thread | Simon Rettberg | 2019-08-07 | 1 | -4/+4 |
| | |||||
* | [SERVER] uplink: Improve attaching to existing requests | Simon Rettberg | 2019-08-06 | 1 | -23/+74 |
| | | | | | Allow attaching in ULR_PROCESSING state, leave lower slots empty to increase chances attaching to ULR_PROCESSING. | ||||
* | [SERVER] Fix: Client thread could destroy sendMutex while in use | Simon Rettberg | 2019-08-06 | 1 | -0/+3 |
| | | | | | | Fix a race condition where the client thread tears down the client struct including the sendMutex while the uplink thead is currently holding the lock, trying to send data to the client. | ||||
* | [SERVER] Allow uplink shutdown if bgrMinClients > image->users | Simon Rettberg | 2019-08-05 | 1 | -1/+2 |
| | |||||
* | [SERVER] Turn all spinlocks into mutexes | Simon Rettberg | 2019-07-26 | 1 | -94/+94 |
| | | | | | | | | Just assume sane platforms offer smart mutexes that have a fast-path with spinlocks internally for locks that have little to no congestion. In all other cases, mutexes should perform better anyways. | ||||
* | [SERVER] uplink: Relay request in client's thread if possible | Simon Rettberg | 2019-07-23 | 1 | -3/+56 |
| | | | | | Early benchmarking shows that this is faster, since we don't require another thread to wake up just to send out the request. | ||||
* | [SERVER] Don't shutdown uplink if background replication is FULL | Simon Rettberg | 2019-02-13 | 1 | -1/+1 |
| | |||||
* | [SERVER] uplink: Dedicated function for handling link failure | Simon Rettberg | 2019-02-08 | 1 | -31/+50 |
| | |||||
* | [SERVER] Don't keep an uplink connection established forever | Simon Rettberg | 2019-01-31 | 1 | -38/+70 |
| | | | | | | In case we don't use background replication a connection to an uplink server can potentially stay around forever. This in turn would prevent the uplink server from freeing the image as it appears to be in use. | ||||
* | [SERVER] uplink: Check for _maxPayload when getting client request | Simon Rettberg | 2019-01-31 | 1 | -0/+4 |
| | | | | | | It didn't make too much sense that we only checked _maxPayload when the reply arrived; simply don't forward a request where we already know we won't handle the reply. | ||||
* | [SERVER] Fix last block replicating indefinitely in hasblock mode | Simon Rettberg | 2018-08-14 | 1 | -5/+7 |
| | |||||
* | [SERVER] Use atomic vars for uplink byte counters | Simon Rettberg | 2018-08-13 | 1 | -26/+4![]() |
| | |||||
* | [SERVER] Use atomic var for (total)bytesSent counters | Simon Rettberg | 2018-08-08 | 1 | -2/+0![]() |
| | | | | | | Gets rid of the lastBytesSent field as well as the stats lock per client. Cleaned and split up the messy net_clientsToJson function while at it. | ||||
* | [SERVER] Add missing file mode to open() call | Simon Rettberg | 2018-07-26 | 1 | -2/+2 |
| |