diff options
| author | Sebastian Vater | 2025-09-09 14:43:39 +0200 |
|---|---|---|
| committer | Sebastian Vater | 2025-09-09 14:43:39 +0200 |
| commit | 37312eeb111e04711f106eb78880fc2ec4e3e42f (patch) | |
| tree | 17038476bb993d631b50bc1d84baeaae77f454aa /src/server/server.c | |
| parent | iSCSI SCSI emulation for DNBD3 started and most block based operations finish... (diff) | |
| download | dnbd3-37312eeb111e04711f106eb78880fc2ec4e3e42f.tar.gz dnbd3-37312eeb111e04711f106eb78880fc2ec4e3e42f.tar.xz dnbd3-37312eeb111e04711f106eb78880fc2ec4e3e42f.zip | |
Implemented iSCSI very basic locking for multithreaded usage. Also added non-block SCSI emulation opcodes and emulate some of them. Finally, a lot of code refactoring was done for easier SCSI emulation.
Diffstat (limited to 'src/server/server.c')
| -rw-r--r-- | src/server/server.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/server.c b/src/server/server.c index bfda12d..d6b849c 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -179,6 +179,7 @@ _Noreturn static void dnbd3_cleanup() // Destroy iSCSI global vector iscsi_destroy(); + pthread_rwlock_destroy( &iscsi_globvec_rwlock ); // Clean up images retries = 5; @@ -370,7 +371,7 @@ int main(int argc, char *argv[]) integrity_init(); net_init(); - if ( iscsi_create() < 0 ) + if ( (pthread_rwlock_init( &iscsi_globvec_rwlock, NULL ) != 0) || (iscsi_create() < 0) ) return EXIT_FAILURE; uplink_globalsInit(); |
