Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [SERVER] Fix warnings, simplify locking | Simon Rettberg | 2019-08-26 | 2 | -12/+13 |
| | |||||
* | [BENCH] Check CMD_GET_BLOCK reply cmd type | Simon Rettberg | 2019-08-23 | 1 | -0/+3 |
| | |||||
* | [SERVER] Get rid of alt-servers thread, per-uplink rtt history | Simon Rettberg | 2019-08-22 | 9 | -485/+469 |
| | | | | | | | | | | 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] Put request handle into CMD_ERROR reply | Simon Rettberg | 2019-08-22 | 1 | -1/+1 |
| | |||||
* | [SERVER] Add struct representing active connection to uplink server | Simon Rettberg | 2019-08-18 | 5 | -66/+60 |
| | |||||
* | [SERVER] uplink: More consistent type/variable naming | Simon Rettberg | 2019-08-18 | 5 | -288/+294 |
| | | | | | * Change link to uplink everywhere * dnbd3_connection_t -> dnbd3_uplink_t | ||||
* | [SERVER] altservers: Don't run check if <= 1 alt server available | Simon Rettberg | 2019-08-18 | 1 | -4/+11 |
| | |||||
* | [SERVER] net.c: Minor reordering | Simon Rettberg | 2019-08-18 | 1 | -8/+9 |
| | |||||
* | [SERVER] Lock free thread pool | Simon Rettberg | 2019-08-16 | 1 | -53/+57 |
| | |||||
* | [SHARED] Better errno handling in connect() helper | Simon Rettberg | 2019-08-15 | 1 | -0/+8 |
| | |||||
* | [SERVER] Better lock debugging: Always check lock order | Simon Rettberg | 2019-08-07 | 10 | -219/+192 |
| | | | | | | 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 | 2 | -48/+57 |
| | |||||
* | [BENCH] Allow specifying request block size | Simon Rettberg | 2019-08-07 | 4 | -19/+32 |
| | |||||
* | [SERVER] Use more _Atomic | Simon Rettberg | 2019-08-07 | 2 | -5/+4 |
| | |||||
* | [SERVER] Fix race condition and invalid lock order | Simon Rettberg | 2019-08-07 | 1 | -4/+7 |
| | |||||
* | [SERVER] uplink: Improve attaching to existing requests | Simon Rettberg | 2019-08-06 | 2 | -35/+74 |
| | | | | | Allow attaching in ULR_PROCESSING state, leave lower slots empty to increase chances attaching to ULR_PROCESSING. | ||||
* | [BENCH] Increase timeouts, fix block payload reading | Simon Rettberg | 2019-08-06 | 1 | -3/+3 |
| | |||||
* | [BENCH] Fix a couple bugs in stress tester | Simon Rettberg | 2019-08-06 | 3 | -82/+70 |
| | |||||
* | [SERVER] Improve debug output if a locked lock gets destroyed | Simon Rettberg | 2019-08-06 | 1 | -0/+1 |
| | |||||
* | [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] Add sanity check to threadpool_run for NULL routine | Simon Rettberg | 2019-08-05 | 1 | -0/+4 |
| | |||||
* | [SERVER] Switch threadpool back to spinlock, add idle thread counter | Simon Rettberg | 2019-08-05 | 1 | -22/+23 |
| | |||||
* | [SERVER] Atomicize some global flags | Simon Rettberg | 2019-08-03 | 2 | -2/+2 |
| | |||||
* | [SERVER] Make image->users atomic and get rid of some locking | Simon Rettberg | 2019-08-02 | 2 | -53/+40 |
| | | | | | | | | With this change it should be safe to read the users count of an image without locking first, assuming you already have a reference on the image or are otherwise sure it cannot be freed, i.e. in an active uplink. Updating users, or checking whether it's 0 in order to free the image should only be done while holding the imageListLock. | ||||
* | i[SERVER] Include new pretendClient in config dumpv2.2 | Simon Rettberg | 2019-08-02 | 1 | -0/+1 |
| | |||||
* | [SERVER] Fix compile in release mode | Simon Rettberg | 2019-08-02 | 1 | -1/+1 |
| | |||||
* | [SERVER] Turn all spinlocks into mutexes | Simon Rettberg | 2019-07-26 | 11 | -412/+467 |
| | | | | | | | | 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] Add pretendClient config option | Simon Rettberg | 2019-07-23 | 3 | -1/+10 |
| | | | | | | This makes the server not set the FLAGS8_SERVER flag when establishing an uplink connection. Useful mostly for running a proxy on localhost for local caching. | ||||
* | [SERVER] uplink: Relay request in client's thread if possible | Simon Rettberg | 2019-07-23 | 2 | -3/+57 |
| | | | | | Early benchmarking shows that this is faster, since we don't require another thread to wake up just to send out the request. | ||||
* | [FUSE] Add --sticky mode to ignore alt-servers announced by servers | Simon Rettberg | 2019-03-07 | 3 | -6/+16 |
| | |||||
* | [FUSE] Clean up argument handling, improve help | Simon Rettberg | 2019-03-07 | 1 | -19/+10 |
| | |||||
* | [KERNEL] Lower queue->limits.max_sectors to 256, like nbd | Simon Rettberg | 2019-02-13 | 1 | -1/+1 |
| | |||||
* | [SERVER] Don't shutdown uplink if background replication is FULL | Simon Rettberg | 2019-02-13 | 1 | -1/+1 |
| | |||||
* | [FUSE] Use shared/timing.* instead of nowMilli/Micro | Simon Rettberg | 2019-02-09 | 2 | -57/+43 |
| | |||||
* | [SHARED] More timing helpers | Simon Rettberg | 2019-02-09 | 1 | -0/+23 |
| | |||||
* | [FUSE] Consider RTT of active connection for switch-decisions | Simon Rettberg | 2019-02-08 | 2 | -55/+123 |
| | |||||
* | [SERVER] uplink: Dedicated function for handling link failure | Simon Rettberg | 2019-02-08 | 1 | -31/+50 |
| | |||||
* | [SERVER] integrity: Group check requests, use sync_file_range() | Simon Rettberg | 2019-02-04 | 1 | -25/+51 |
| | | | | | | | This requires a much shorter queue and balances hashing between different images if the checker lags behind. On Linux, use sync_file_range() instead of fsync() before reading back to speed up flushing. | ||||
* | [SERVER] Cosmetic changes (loglvl, comment) | Simon Rettberg | 2019-02-04 | 1 | -2/+2 |
| | |||||
* | [SERVER] Export image idle time in json rpc | Simon Rettberg | 2019-01-31 | 1 | -3/+6 |
| | | | | Counter in seconds for how long this image hasn't been used. | ||||
* | [SERVER] altservers.c: Improve log output | Simon Rettberg | 2019-01-31 | 2 | -20/+19 |
| | |||||
* | [SERVER] Don't keep an uplink connection established forever | Simon Rettberg | 2019-01-31 | 5 | -49/+93 |
| | | | | | | 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] Lower log-level of non-critical message | Simon Rettberg | 2019-01-30 | 2 | -2/+3 |
| | |||||
* | [SERVER] Only set BGR flag in handshake for BGR_FULL | Simon Rettberg | 2018-11-16 | 2 | -2/+2 |
| | | | | | | | _backgroundReplication was still treated as a boolean flag, so a server with BGR_NONE would reject a server with BGR_HASHBLOCK. While this still forces the BGR_NONE proxy to replicate more than it normally would, it seems reasonable to allow this. | ||||
* | [SERVER] Fix json format string | Simon Rettberg | 2018-11-16 | 1 | -1/+1 |
| | | | | Don't drop runId | ||||
* | [KERNEL] Fix keep alive timer on 4.15+ | Simon Rettberg | 2018-08-15 | 1 | -1/+1 |
| | |||||
* | [SERVER] rpc: Distinguish between client and server (proxy) connections | Simon Rettberg | 2018-08-14 | 3 | -8/+18 |
| | |||||
* | [SERVER] Fix last block replicating indefinitely in hasblock mode | Simon Rettberg | 2018-08-14 | 1 | -5/+7 |
| |