summaryrefslogtreecommitdiffstats
path: root/src/server
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] Speed up replicationHEADSimon Rettberg2026-01-204-173/+233
| | | | | | | | Handling block replies on uplink connections is now parallelized: - write to disk - relay data to clients - request next chunk (when BGR is active) happens in parallel now.
* [SERVER] iscsi: More commentsSimon Rettberg2025-12-091-18/+54
|
* [SERVER] iscsi: Add bracesSimon Rettberg2025-12-091-22/+38
|
* [SERVER] iscsi: Update a few doxygen blocksSimon Rettberg2025-12-091-57/+52Star
|
* [SERVER] iscsi: Make iscsi_connection stack-allocatedSimon Rettberg2025-12-091-64/+6Star
|
* [SERVER] iscsi: May not -> Must notSimon Rettberg2025-12-091-39/+39
|
* [SERVER] iscsi: Replace int8 with uint8, remove unused login flagsSimon Rettberg2025-12-092-58/+20Star
|
* [SERVER] iscsi: Implement NOP-In on idle timeoutSimon Rettberg2025-12-091-29/+45
| | | | | | | If the socket timeout triggers while we wait for the next iSCSI PDU, send a NOP-In with the transfer tag set, so that the initiator is required to send a NOP-Out in response. If the following reveive times out once again, tear down the connection.
* [SERVER] iscsi: Fix handling of reason_code in logout requestSimon Rettberg2025-12-092-2/+7
| | | | Only the lower 7 bits carry the reason code, mask away highest bit.
* [SERVER] iscsi: fix typoSimon Rettberg2025-12-091-2/+2
|
* [SERVER] iscsi: Remove unused defines, move session into connectionSimon Rettberg2025-12-092-1072/+70Star
|
* [SERVER] iscsi: Report read cache enabled; report maximum prefetchSimon Rettberg2025-12-091-4/+10
| | | | | ctld is also reporting maximum prefetch values, so let's just do the same.
* [SERVER] iscsi: Fix endianness bugs in ACTION(16) and rotation rateSimon Rettberg2025-12-091-22/+18Star
|
* [SERVER] iscsi: Make kernel fast againSimon Rettberg2025-12-091-7/+22
|
* [SERVER] iscsi: Make iscsi_task stack-allocatedSimon Rettberg2025-12-092-91/+25Star
| | | | Saves another round of malloc/free calls on every request.
* [SERVER] iscsi: Overhaul sending of SCSI response, and DATA-In loopSimon Rettberg2025-12-092-184/+131Star
|
* [SERVER] iscsi: Add bytesSent accounting, set thread nameSimon Rettberg2025-12-091-0/+5
|
* [SERVER] iscsi: Minor clang-tidy cleanups (mostly)Simon Rettberg2025-12-091-230/+114Star
| | | | | | - Remove redundant case block - Remove redundant const/struct prefix - Fix a couple missing params in Doxygen blocks
* [SERVER] iscsi: Reply OK to any task management functionSimon Rettberg2025-12-092-1/+235
| | | | | | | Since we process everything sequentially, by the time we receive any task management function, the task referenced in the request has already been rejected (or processed), so we just reply OK for now, so the SNs don't get messed up.
* [SERVER] iscsi: Remove unused functions & casts, turn [0] into []Simon Rettberg2025-12-092-306/+104Star
| | | | | | | In functions that can handle multiple different structs, instead of picking an arbitrary one as the pointer type in the function signature, pass an uint8_t and cast to the according struct in the sub-cases in the method body.
* [SERVER] iscsi: Rename constant to reflect it means LOGICAL block sizeSimon Rettberg2025-12-092-21/+22
| | | | ... The other one is already named PHYSICAL
* [SERVER] iscsi: Unify usage of length and position variablesSimon Rettberg2025-12-092-461/+213Star
| | | | | | | | | | | | There were a lot of similarly named and redundant variables in various structs named pos, len, xfer_len, des_xfer_pos, etc. It could be very challenging to keep track of what information is stored where when working with the code. Attempt to minimize this by relying only on a single "len" variable in the scsi_task struct. This refactoring uncovered a few inconsistencies in how allocation length limitations were handled, which were addressed here too.
* [SERVER] iscsi: Refactor receive function and PDU handlingSimon Rettberg2025-12-092-1054/+615Star
| | | | | | | | | | | | - Fold header/data handling into one function This uncovered a few redundant checks and makes it easier to reason about control flow - Make all iscsi_pdu stack-allocated This greatly reduces the number of malloc and free calls during normal operation, lowers the risk of memory management bugs, and potentially increases performance in high concurrency scenarios.
* [SERVER] iscsi: Honor global _shutdownSimon Rettberg2025-12-092-6/+1Star
|
* [SERVER] iscsi: Restore proper padding of DataSegmentSimon Rettberg2025-12-091-0/+7
| | | | | | | | This broke when sending ds payload was refactored to avoid copying the buffer into the PDU's buffer before sending. iscsi_connection_pdu_create took care of this before, but now that we send the source buffer directly, pad the packet manually after sending the buffer contents if required.
* [SERVER] iscsi: Cleanup commented-out codeSimon Rettberg2025-12-091-5/+0Star
|
* [SERVER] iscsi: Change LUN to 0Simon Rettberg2025-12-091-1/+1
| | | | Makes using the kernel's iscsi module simpler
* Fix AFL buildSimon Rettberg2025-12-096-36/+14Star
|
* [SERVER] Refactor classic dnbd3 code a bit, locking etc.Simon Rettberg2025-12-091-28/+54
|
* [SERVER] iscsi: Fix crashesSimon Rettberg2025-12-092-36/+40
|
* [SERVER] Check if iSCSI server is enabled, check opcodeSimon Rettberg2025-12-093-12/+16
|
* [SERVER] iscsi: use sendfile()Simon Rettberg2025-12-094-151/+105Star
|
* [SERVER] iscsi refactor: First working versionSimon Rettberg2025-12-099-18065/+2732Star
| | | | | | | | | Work towards simplifying the iscsi implementation has begun. Goals are: - Simpler and easier to understand resource/lifecycle management of allocations - Single-threaded architecture, making locking unnecessary - Moving as many allocations as possible to the stack - Making the call-stack more shallow for easier tracking of code flow
* [SERVER] iscsi: Implement relaying requests to uplink serversSimon Rettberg2025-12-092-26/+97
|
* [SERVER] iscsi: Hook into net.c, text response handling, more features:Sebastian Vater2025-12-098-2256/+15641
| | | | | | | | | | | | | | | - R2T handling - Portal groups - Fixes to login phase handling - Code refactoring - Remove obsolete PDU fields - SCSI INQUIRY handler - Persistent Reservation support - Implement SCSI block based operations - Implement other needed SCSI ops - Disks are now reported as read-only - Doxygen tags - Bugfixes for crashes, memleaks, etc.
* [SERVER] iscsi: Finish login handling, add NOP-In/Out handlingSebastian Vater2025-12-092-261/+1448
| | | | Also a couple bug fixes and other minor improvements
* [SERVER] iscsi: Implement receive loop, add a lot of new iSCSI structuresSebastian Vater2025-12-092-120/+3956
| | | | | - globals, portal groups, portals, ports, etc. - Finally, fixed some bugs.
* [SERVER] iscsi: Add a lot of Doxygen comments, some general additionsSebastian Vater2025-12-092-2672/+5479
|
* doxygen: Add initial config and gitlab runner jobSimon Rettberg2025-12-092-2/+199
|
* [SERVER] iscsi: Initial commit, WIPSebastian Vater2025-12-093-0/+4589
|
* [SERVER] Verify checksums of all images on SIGUSR1Simon Rettberg2024-07-056-14/+92
|
* [SERVER] integrity: Add comments, line wraps, add check for full scanSimon Rettberg2024-07-041-7/+24
|
* [server] Avoid redefining container_ofSimon Rettberg2024-06-071-0/+2
|
* [SERVER] Log errno if opening image file failsSimon Rettberg2023-06-301-3/+5
|
* [SERVER] Threadpool: Add active thread count to error messageSimon Rettberg2023-06-141-1/+1
|
* [SERVER] Don't establish uplink when loading image on startupSimon Rettberg2022-09-131-1/+1
| | | | | | | Bringing up a proxy that has been offline for some time will trigger lots of loads and replication on other proxies when booting up again. Just wait until a client actually needs an image before establishing an uplink connection.
* [BUILD] Add check for stdatomic.h supportManuel Bentele2021-06-161-0/+1
|
* [SERVER] Add minRequestSize: Enlarge relayed requestsSimon Rettberg2021-05-113-16/+48
| | | | | | | | | | Any request from a client being relayed to an uplink server will have its size extended to this value. It will also be applied to background replication requests, if the BGR mode is FULL. As request coalescing is currently very primitive, this setting should usually be left diabled, and bgrWindowSize used instead, if appropriate. If you enable this, set it to something large (1M+), or it might have adverse effects.
* [SERVER] Fix UBSimon Rettberg2021-05-111-1/+1
|
* [SERVER] Honor uplinkTimeout directly when connecting to alt-serverSimon Rettberg2021-05-102-5/+3Star
|