summaryrefslogtreecommitdiffstats
path: root/src/kernel/sysfs.c
Commit message (Collapse)AuthorAgeFilesLines
* [KERNEL] Adapt to Linux 5.18Simon Rettberg2022-06-141-1/+10
|
* [KERNEL] Refactor to use workqueues and blk-mq onlySimon Rettberg2022-02-181-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using workqueues frees us from having to manage the lifecycle of three dedicated threads. Discovery (alt server checks) and sending keepalive packets is now done using work on the power efficient system queue. Sending and receiving happens via dedicated work queues with higher priority. blk-mq has also been around for quite a while in the kernel, so switching to it doesn't hurt backwards compatibility. As the code is now refactored to work more as blk-mq is designed, backwards compatibility even improved while at the same time freeing us from an arsenal of macros that were required to make the blk-mq port look and feel like the old implementation. For example, the code now compiles on CentOS 7 with kernel 3.10 without requiring special macros to detect the heavily modified RedHat kernel with all its backported features. A few other design limitations have been rectified along the way, e.g. switching to another server now doesn't internally disconnect from the current one first, which theoretically could lead to a non-working setup, if the new server isn't reachable and then - because of some transient network error - switching back also fails. As the discover-thread was torn down from the disconnect call, the connection would also not repair itself eventually. we now establish the new connection in parallel to the old one, and only if that succeeds do we replace the old one with it, similar to how the automatic alt-server switch already does it.
* [KERNEL] Removes duplicate word 'of' in license headersManuel Bentele2021-04-161-1/+1
|
* [KERNEL] Overhaul sysfs filesSimon Rettberg2021-03-261-34/+18Star
| | | | | | Remove superflous, reduntant or otherwise useless information. Use space as separator instead of comma for better readability and easier parsing in shell etc.
* [KERNEL] Use sockaddr instead of dnbd3_host_t where possibleSimon Rettberg2021-03-241-31/+12Star
| | | | | | | | Convert dnbd3_host_t to struct sockaddr immediately when adding alt servers, so we don't have to convert it every time we establish a connection. Additionally we can now use %pISpc in printf-like functions instead of having if/else constructs whenever we want to print an address.
* [KERNEL] Refactor code to satisfy Linux kernel code styleManuel Bentele2021-03-121-74/+69Star
|
* [KERNEL] convert debug messages and clean up codeManuel Bentele2020-08-281-5/+5
| | | | | | | | | | | | This change converts all debug messages to support the Linux kernel's dynamic debug feature. Debug messages can be enabled or disabled by the debug feature if the - kernel module is built in debug mode (EXTRA_CFLAGS=-g -DDEBUG) - Linux kernel supports dynamic debug (CONFIG_DYNAMIC_DEBUG is set) This patch removes outdated kernel compatibility macros (used for Linux kernels in version 4.x) and cleans up the kernel module's code.
* [*] Introduce constants for IPv4/6 in dnbd3_host_tSimon Rettberg2017-10-281-4/+4
| | | | | | | 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.
* [SERVER] Crank up warning levels of gcc and fix them all (mostly sign ↵Simon Rettberg2015-01-141-1/+4
| | | | | | | 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.
* [SERVER] Check which dnbd3 devices are idle and ready to use for proxy modesr2012-09-031-11/+11
| | | | | | [SERVER] Skeleton of server-to-server communication [SERVER] Update access-time of images in use by actual clients [*] Add dnbd3_host_t type to handle address+port+addrtype consistently across the project
* [*] Fixed and unified formattingsr2012-09-031-58/+58
|
* fix complile errorsr2012-09-011-1/+2
|
* [KERNEL] Tell server whether we're a client or a server in proxy modesr2012-09-011-1/+3
| | | | | [KERNEL] SysFS: Return empty string for current_server if not connected [SERVER] Code refactoring
* [KERNEL] Refactor and extend sysfs (add data the server will need in proxy mode)sr2012-08-271-75/+62Star
| | | | | | | [SERVER] Use MSG_MORE instead of cork/uncork to save two syscalls [KERNEL] Fail-Counter for alt servers, ignore servers that fail too often [KERNEL] Add new alt servers to list, instead of replacing the old list [*] Add CMD_LATEST_RID to tell client about new revisions
* [*] Cleanup, comments, more error checkssr2012-08-241-11/+12
| | | | | | | | [SERVER] Fix a few off-by-one bugs [SERVER] Make log available through IPC [KERNEL] Hot-Swap to faster connection on load-balance [KERNEL] Report I/O error to block layer if no server replies within a given time frame [*] Modified network protocol to handle volume names instead of ids
* [ALL] Some cleanupJohann Latocha2012-05-211-15/+0Star
|
* [KERNEL] Notify if new release available (sysfs)Johann Latocha2012-04-201-0/+13
|
* [MISC] Config file updateJohann Latocha2012-02-221-2/+2
|
* [ALL] Bugs, bugs, bugs...Johann Latocha2012-02-221-3/+4
|
* [KERNEL] SysFS interface added (/sys/block/dnbd*/net/)Johann Latocha2012-02-211-0/+212