summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] iscsi: Make iscsi_connection stack-allocatediscsi-refactorSimon Rettberg2025-11-131-64/+6Star
|
* [SERVER] iscsi: May not -> Must notSimon Rettberg2025-11-121-39/+39
|
* [SERVER] iscsi: Replace int8 with uint8, remove unused login flagsSimon Rettberg2025-11-122-58/+20Star
|
* [SERVER] iscsi: Implement NOP-In on idle timeoutSimon Rettberg2025-11-121-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-11-122-2/+7
| | | | Only the lower 7 bits carry the reason code, mask away highest bit.
* [SERVER] iscsi: fix typoSimon Rettberg2025-11-111-2/+2
|
* [SERVER] iscsi: Remove unused defines, move session into connectionSimon Rettberg2025-11-112-1072/+70Star
|
* [SERVER] iscsi: Report read cache enabled; report maximum prefetchSimon Rettberg2025-11-111-4/+10
| | | | | ctld is also reporting maximum prefetch values, so let's just do the same.
* [SERVER] iscsi: Fix endianness conversion of rotation rateSimon Rettberg2025-11-111-16/+16
|
* [SERVER] iscsi: Make kernel really fast againSimon Rettberg2025-11-101-10/+22
| | | | Hopefully for real this time.
* [SERVER] iscsi: Make kernel fast againSimon Rettberg2025-11-071-4/+7
|
* [SERVER] iscsi: Make iscsi_task stack-allocatedSimon Rettberg2025-11-062-91/+25Star
| | | | Saves another round of malloc/free calls on every request.
* [SERVER] iscsi: Overhaul sending of SCSI response, and DATA-In loopSimon Rettberg2025-11-062-184/+131Star
|
* [SERVER] iscsi: Add bytesSent accounting, set thread nameSimon Rettberg2025-11-061-0/+5
|
* [SERVER] iscsi: Minor clang-tidy cleanups (mostly)Simon Rettberg2025-11-061-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-11-062-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: Reduce number of castsSimon Rettberg2025-11-031-63/+65
| | | | | | | In functions that can handle multiple different structs, instead of picking an arbitrary one as the pointer type in the method signature, pass an uint8_t and cast to the according struct in the sub-cases in the method body.
* [SERVER] iscsi: Turn [0] fields into [], remove unused onesSimon Rettberg2025-11-031-112/+32Star
|
* [SERVER] iscsi: Remove more unused stuffSimon Rettberg2025-10-312-131/+7Star
|
* [SERVER] iscsi: Fix endianness bugSimon Rettberg2025-10-311-6/+2Star
|
* [SERVER] iscsi: Rename constant to reflect it means LOGICAL block sizeSimon Rettberg2025-10-312-21/+22
| | | | ... The other one is already named PHYSICAL
* [SERVER] iscsi: Unify usage of length and position variablesSimon Rettberg2025-10-302-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-10-304-1056/+617Star
| | | | | | | | | | | | - 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-10-272-6/+1Star
|
* [SERVER] iscsi: Restore proper padding of DataSegmentSimon Rettberg2025-10-241-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-10-241-5/+0Star
|
* [SERVER] iscsi: Change LUN to 0Simon Rettberg2025-10-241-1/+1
| | | | Makes using the kernel's iscsi module simpler
* Update README and sample configSimon Rettberg2025-10-244-552/+5Star
|
* Fix AFL buildSimon Rettberg2025-10-2410-42/+26Star
|
* [SERVER] Refactor classic dnbd3 code a bit, locking etc.Simon Rettberg2025-10-241-28/+54
|
* [SERVER] iscsi: Fix crashesSimon Rettberg2025-10-243-37/+41
|
* [SERVER] Check if iSCSI server is enabled, check opcodeSimon Rettberg2025-10-243-12/+16
|
* [SERVER] iscsi: use sendfile()Simon Rettberg2025-10-246-151/+122Star
|
* [SERVER] iscsi refactor: First working versionSimon Rettberg2025-10-248-5315/+2289Star
|
* WIPSimon Rettberg2025-10-246-13043/+738Star
|
* Fixes to iSCSI DNBD3 proxy uplink handling.Sebastian Vater2025-10-072-87/+67Star
|
* Moved uplink mutex / condition init and destroy to task creation and ↵Sebastian Vater2025-10-063-37/+185
| | | | destruction functions. Finally, some small code refactoring.
* [SERVER] iscsi: Implement relaying requests to uplink serversSimon Rettberg2025-10-062-3/+69
|
* Implemented iSCSI global and SCSI device specific INI file configuration. ↵Sebastian Vater2025-10-068-710/+2959
| | | | Also fixed some bugs and added iscsi.conf. finally did some code refactoring and fixed remaining valgrind memory leaks.
* Added more mutexes and read/write locks to iSCSI server. Finally, moved temp ↵Sebastian Vater2025-10-012-40/+146
| | | | exec queue from globals to conn.
* Implemented better read/write and mutex locking in iSCSI server. Some little ↵Sebastian Vater2025-10-012-186/+399
| | | | code cleanups and finally bug fixes again.
* Fixed some very memory leaks in iSCSI reported by valgrind and improved ↵Sebastian Vater2025-09-302-107/+52Star
| | | | session and connection management.
* Fixed crash in iSCSI server if a write command is sent.Sebastian Vater2025-09-302-11/+92
|
* Images are now propagated as a read-only SCSI device in iSCSI implementation ↵Sebastian Vater2025-09-292-11/+48
| | | | and WRITE operations return correct SCSI sense key, ASC and ASCQ in an attempt to write to a read-only device. Finally, another valgrind SCSI INQUIRY memleak fixed.
* Fixed various memory leaks reported by valgrind. Also fixed some bugs in ↵Sebastian Vater2025-09-293-1572/+1589
| | | | DNBD3 image WWN retrieval handling. Finally, did huge code refactoring.
* Implemented iSCSI DNBD3 image name and WWN extraction from IQN. Also fixed ↵Sebastian Vater2025-09-262-151/+340
| | | | some remaining bugs with initial structure creation caused crashes on reconnection. Finally, reindentation is now all tabs.
* Huge iSCSI refactoring. Added doubly linked list for iSCSI and SCSI task ↵Sebastian Vater2025-09-252-787/+523Star
| | | | management due to use of hash map keys after free. Finally, some more bugs fixed.
* Fixed most iSCSI related valgrind hints. Finally, some more bugs fixed.Sebastian Vater2025-09-232-54/+76
|
* Added iSCSI PDU reference tag and relative desired data position to iSCSI ↵Sebastian Vater2025-09-232-457/+266Star
| | | | task. Also fixed doxygen documentation and code cleanup. Finally, removed obselete iSCSI packet validation function.
* Fixed remaining iSCSI bugs which prevent Debian ISO from booting and ↵Sebastian Vater2025-09-182-254/+280
| | | | running. Finally, a lot of code refactoring done.