diff options
author | Simon Rettberg | 2020-03-03 14:55:01 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-03-03 14:55:01 +0100 |
commit | 5bc3badd013b88201da64dc970600d19451daaec (patch) | |
tree | d2aec58cfd872302b61c59125daf972e4dc816be /src/server/globals.h | |
parent | [SERVER] Remove "working" flag, introduce fine-grained flags (diff) | |
download | dnbd3-5bc3badd013b88201da64dc970600d19451daaec.tar.gz dnbd3-5bc3badd013b88201da64dc970600d19451daaec.tar.xz dnbd3-5bc3badd013b88201da64dc970600d19451daaec.zip |
[SERVER] Also add a flag for uplink queue overload
Diffstat (limited to 'src/server/globals.h')
-rw-r--r-- | src/server/globals.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/globals.h b/src/server/globals.h index 31fbce5..0bd6e47 100644 --- a/src/server/globals.h +++ b/src/server/globals.h @@ -93,7 +93,7 @@ struct _dnbd3_uplink // If BGR == BGR_HASHBLOCK, -1 means "currently no incomplete block" uint64_t replicationHandle; // Handle of pending replication request atomic_uint_fast64_t bytesReceived; // Number of bytes received by the uplink since startup. - atomic_int queueLen; // length of queue + int queueLen; // length of queue uint32_t idleTime; // How many seconds the uplink was idle (apart from keep-alives) dnbd3_queued_request_t queue[SERVER_MAX_UPLINK_QUEUE]; dnbd3_alt_local_t altData[SERVER_MAX_ALTS]; @@ -141,6 +141,7 @@ struct _dnbd3_image atomic_bool write; // Error writing to file atomic_bool read; // Error reading from file atomic_bool changed; // File disappeared or changed, thorough check required if it seems to be back + atomic_bool queue; // Too many requests waiting on uplink } problem; uint16_t rid; // revision of image pthread_mutex_t lock; |