summaryrefslogtreecommitdiffstats
path: root/src/server/globals.h
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-23 17:20:20 +0200
committerSimon Rettberg2019-07-23 17:24:27 +0200
commit7937c7db7baea296fce4055a9e9f498e67da2d09 (patch)
tree72574175ea6aa5bc2890fd792c499355a7b2bfab /src/server/globals.h
parent[FUSE] Add --sticky mode to ignore alt-servers announced by servers (diff)
downloaddnbd3-7937c7db7baea296fce4055a9e9f498e67da2d09.tar.gz
dnbd3-7937c7db7baea296fce4055a9e9f498e67da2d09.tar.xz
dnbd3-7937c7db7baea296fce4055a9e9f498e67da2d09.zip
[SERVER] uplink: Relay request in client's thread if possible
Early benchmarking shows that this is faster, since we don't require another thread to wake up just to send out the request.
Diffstat (limited to 'src/server/globals.h')
-rw-r--r--src/server/globals.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server/globals.h b/src/server/globals.h
index 2b30bc2..9b10ee4 100644
--- a/src/server/globals.h
+++ b/src/server/globals.h
@@ -53,6 +53,7 @@ struct _dnbd3_connection
int version; // remote server protocol version
dnbd3_signal_t* signal; // used to wake up the process
pthread_t thread; // thread holding the connection
+ pthread_mutex_t sendMutex; // For locking socket while sending
pthread_spinlock_t queueLock; // lock for synchronization on request queue etc.
dnbd3_image_t *image; // image that this uplink is used for; do not call get/release for this pointer
dnbd3_host_t currentServer; // Current server we're connected to