summaryrefslogtreecommitdiffstats
path: root/src/fuse/connection.c
Commit message (Collapse)AuthorAgeFilesLines
* [FUSE] More cleanup and minor fixesSimon Rettberg48 hours1-9/+1Star
| | | | | | | | - Add support for aborting session and further uploads via SIGQUIT - Make API versioned - Change it to "uuid" everywhere instead of a mix of uuid and guid - Server can now tell us to wait with further uploads - merge request is now urlencoded POST instead of mime data
* [FUSE] cow: Cleanup, comments, fixes, minor refactoringSimon Rettberg48 hours1-7/+13
| | | | | | | | | - Use the term "cluster" for a group of dnbd3-blocks instead of also calling them blocks. - Use term "table" instead of "array" for the L1 and L2 tables. - Use term "index" instead of "offset" when addressing those tables - Fix a few logic bugs, use-after-free - Add TODOs for parts that need better comments
* [FUSE] basic cow implementation & rudimentary testsMichael Scherle48 hours1-6/+43
|
* [FUSE] Fix termination condition for reading host listSimon Rettberg2023-02-141-1/+1
|
* [FUSE] Make initial connect entirely parallel wrt serversSimon Rettberg2023-02-121-111/+232
| | | | | | | | | | | | Previously, we only did the actual socket connect in a concurrent matter. Once a connection was successfully established, we did a blocking handshake on the protocol level. If the server war particularly slow, this was bad as we would not try other servers until after this. Throw out the previous non-blocking async connect logic, switching to a multi-threaded approach, that spawns one thread per host/ip, offset by 200ms, until one of the attempts succeeds.
* [FUSE] Fix AIOOB accessSimon Rettberg2023-02-121-2/+1Star
|
* [FUSE] Adapt to changed macro namesSimon Rettberg2022-05-201-4/+4
|
* [BUILD] rewrite CMake build system to track changes of source filesManuel Bentele2020-10-161-5/+5
| | | | | | | | | | 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.
* [FUSE] Fix returning pending request on RTT measurementSimon Rettberg2020-07-241-12/+4Star
|
* [FUSE] CleanupSimon Rettberg2020-07-241-9/+5Star
|
* [FUSE] Detach old receive thread when creating anew one, update varSimon Rettberg2020-07-241-2/+2
|
* [FUSE] Refactor signal handling on termination againSimon Rettberg2020-07-241-14/+16
|
* [FUSE] Properly signal worker threads to exit on shutdownSimon Rettberg2020-07-211-21/+58
| | | | | | Our main signal handler sends SUGHUP to the receiver and background threads, so if they block in some recv() or poll() they will get EINTR and can check keepRunning.
* [FUSE] FormattingSimon Rettberg2020-07-211-45/+48
|
* [FUSE] Fix a bunch of warningsSimon Rettberg2020-07-211-1/+1
|
* leak fix in mainln-tech2020-01-121-1/+2
|
* fixed code: removed useless splicing, code optimization, commandline ↵ln-tech2020-01-081-31/+8Star
| | | | arguments fixed, auto_cache in lowlevel activated, multi and single threaded modes are supported now
* code fixes, keepRunning is back, threads seem to be safeln-tech2019-11-151-11/+7Star
|
* SIGINT fix, Reader-Writer oroblem fixln-tech2019-11-131-11/+16
|
* cleaned codeln-tech2019-10-271-10/+6Star
|
* cleaned code and atomic_ints againstln-tech2019-10-271-8/+39
|
* [FUSE] Increase socket timeout from 1 to 3 secondsSimon Rettberg2019-08-281-2/+2
|
* [FUSE] Add --sticky mode to ignore alt-servers announced by serversSimon Rettberg2019-03-071-3/+7
|
* [FUSE] Use shared/timing.* instead of nowMilli/MicroSimon Rettberg2019-02-091-56/+41Star
|
* [FUSE] Consider RTT of active connection for switch-decisionsSimon Rettberg2019-02-081-54/+121
|
* [FUSE] In panic mode, use a pending range for alt checkSimon Rettberg2018-07-051-5/+43
| | | | | | | | If we lost connection and then go check all known alt servers, see if we have some pending request queued and if so, use its offset and length for the alt server probe. This ensures that the server being tested is able to satisfy at least the next request we'll send.
* [FUSE] Split final multiConnect-wait across multiple callsSimon Rettberg2017-11-071-8/+8
| | | | | | There might be more than one pending connect, but each call to multiConnect() can return at most one fd, so we could be ignoring some successful connections.
* [FUSE] Reset salen before getpeername() callSimon Rettberg2017-11-071-1/+2
|
* [FUSE] Make use of sock_multiConnect() for initial connectionSimon Rettberg2017-11-061-10/+36
| | | | | | This speeds up initialization with a long list of servers where the first in the list don't work, as the delay between servers is now lowered to 100ms.
* [FUSE] Remember up to 16 alt servers, but work only with 5Simon Rettberg2017-11-041-8/+59
| | | | | | | 5 servers are considered "active", that is, are being measured for their RTT regularly. If We have more than 5 servers and one of the active ones isn't reachable repeatedly, the two servers will swap position.
* [FUSE] Fix printf warning for logadd callSimon Rettberg2017-11-021-1/+1
|
* [FUSE] Improve log messages a bitSimon Rettberg2017-11-011-2/+5
|
* [FUSE] Spacing; Don't check if server proto is newer than clientSimon Rettberg2017-10-241-3/+3
| | | | | | | The server is always backwards compatible, and so should be the client. If support for an older version will not be kept up, MIN_SUPPORTED_{CLIENT,SERVER} will be increased accordingly so that the connection is dropped.
* [FUSE] Fix type mismatch warningsSimon Rettberg2017-10-241-9/+20
|
* [*] Support hop-counting in request header, protocol version 3Simon Rettberg2017-10-171-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.
* [*] Continue splitting #defines to clientconfig.h etc.Simon Rettberg2017-09-021-1/+1
|
* [FUSE] Little more verbosity in some error msgSimon Rettberg2016-11-091-1/+1
|
* [FUSE] Wait a little longer before switching via new approachSimon Rettberg2016-03-231-8/+8
|
* [FUSE] Add new load balancing mechanismSimon Rettberg2016-03-231-12/+49
| | | | | | | | | | | | | | | | | | | | | | | | | The new mechanism is supposed to complement the existing RTT based balancing. While the RTT-averaging approach is better suited to react to sudden drastic changes in server latency. The new approach doesn't directly consider RTT, but keeps track of how many consecutive times each server was the best server when measuring the RTTs. The higher that counter rises, the more likely it will become that the connection switches over to that server. Eg.: Server 1 measures 600µs each time Server 2 measures 599µs each time After a while, in case server 1 is currently used, the connection will eventually switch over to server 2. The RTT-based mechanism would not switch over in this case, since the threshold that prevents constant switching between servers is not reached. The new approach is meant to handle scenarios where the network is generally fast, but it would still be beneficial from a network topology point of view if the clients switch to the slightly faster server, assuming it is closer to the client and thus less network segments are burdened.
* [SHARED] signal.h -> fdsignal.hSimon Rettberg2016-02-101-1/+1
|
* First steps in make signals more abstract from the underlying mechanism; ↵Simon Rettberg2016-02-051-8/+8
| | | | | | | | | | replace epoll with poll. We now don't assume that a signal equals a single fd (eventfd on Linux). The next step would be to create a version of signal.c that uses a pipe internally, so it can be used on other platforms, like *BSD. This is also the reason epoll was replaced with poll in uplink.c
* [FUSE] Handle SIGINT/SIGTERM to abort pending readsSimon Rettberg2015-12-171-0/+3
| | | | | | | | | Before, we would wait endlessly if there is a pending read request that doesn't get answered (e.g. because the server went down. That means you couldn't exit the client in that case. Now we use a signal handler to set a flag which causes the read to bail out and return EIO.
* [FUSE] Fix forking mode (not passing -f) by not spawning threads before ↵Simon Rettberg2015-12-161-24/+40
| | | | entering fuse_main
* [FUSE] Make valgrind happy by initializing memory and not calling close() on -1Simon Rettberg2015-12-101-2/+4
|
* [FUSE] Fix formatting in /status outputSimon Rettberg2015-12-071-6/+4Star
|
* [FUSE] Fix embarrassing memcpy over two different structsSimon Rettberg2015-12-031-3/+6
|
* [FUSE] Add virtual status fileSimon Rettberg2015-12-021-0/+49
|
* [FUSE] Request alt servers from connected serverSimon Rettberg2015-12-021-26/+95
|
* [FUSE] Remove debug code that forced server switches all the timeSimon Rettberg2015-12-011-2/+1Star
|
* [FUSE] Fix losing requests on server changeSimon Rettberg2015-12-011-11/+21
|