| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This makes sure the server we're potentially switching to
can at least serve the next request in the queue, making
sure some progress will be made.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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".
|
| |
|
|
|
|
|
|
| |
Not really namespace but simple string matching for the image path. Path
is matched from start with no support for glob or regex, so usually you
want to have a trailing '/' to limit to certain directories.
|
|
|
|
|
| |
The score wasn't reset when adding clients to the list, resulting in
exactly one server filling up the whole list.
|
| |
|
| |
|
| |
|
|
|
|
| |
First step towards less locking for proxy mode
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
* Change link to uplink everywhere
* dnbd3_connection_t -> dnbd3_uplink_t
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Rounding to 4k so caching works efficiently
This should now close #3231
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
...there were quite a few format string errors as it turns out :/
|
|
|
|
|
|
|
| |
AF_INET luckily was "2" on all platforms checked, so no problems
there with interoperation, but AF_INET6 is different between
Linux, BSD, Windows and possibly others, so map back and forth
between AF_INET/AF_INET6 and HOST_IP4/HOST_IP6 to fix this.
|
|
|
|
|
|
| |
We order the list so that servers that fail are kept at
the end of the list. This is so that when we fetch servers
for RTT measurement, we're less likely to pick those.
|
| |
|
|
|
|
| |
conversion problems
|
|
|
|
|
| |
Introduces new shared source unit timing.[ch]
Closes #3214
|
|
|
|
|
| |
This needs an overhaul; status needs to be moved from global
alt-servers list to individual uplinks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|