| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to POSIX, a signal sent to a PID can be delivered to an
arbitrary thread of that process that hasn't the signal blocked. This
seens to never happen on Linux, but would mess things up since the code
expected the main signal handler to only be executed by the main thread.
This should now be fixed by examining the destination PID of the signal
as well as the ID of the thread currently running the signal handler. If
we notice the signal wasn't sent by our own PID and the handler is not
currently run by the main thread, we re-send the signal to the main
thread. Otherwise, if the signal was sent by our own PID but the handler
is not run in the main thread, do nothing. This way we can use
pthread_kill() to wake up threads that might be stuck in a blocking
syscall when it's time to shut down.
|
|
|
|
| |
First step towards less locking for proxy mode
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is that for full image checks, we don't want to
pollute the fs cache with gigabytes of data that won't be
needed again soon. This would certainly hurt performance
on servers that dont have hundreds of GBs of RAM.
For single block checks during replication this has the
advantage that we don't check the block in memory before
it hit the disk once, but actually flush the data to disk,
then remove it from the page cache, and only then read it
again, from disk.
TODO: Might be worth making this a config option
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
conversion problems
|
|
|
|
| |
false positives
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
Some minor debugging code, mostly commented out
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
function names
|
| |
|
|
|
|
| |
change stupid convention of freeDiskSpace returning 0 on error, which is ambiguous to the disk simply being full...
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
improvements and debugging features
|
|
|