summaryrefslogtreecommitdiffstats
path: root/src/server/image.c
diff options
context:
space:
mode:
authorSimon Rettberg2020-03-13 16:03:29 +0100
committerSimon Rettberg2020-03-13 16:03:29 +0100
commit290d3478f245bb7d2112bb781286a9fbae42b983 (patch)
tree3cc825ae2249126d1f97f4e06592358ab9cfd81a /src/server/image.c
parent[SERVER] Fix data type (diff)
downloaddnbd3-290d3478f245bb7d2112bb781286a9fbae42b983.tar.gz
dnbd3-290d3478f245bb7d2112bb781286a9fbae42b983.tar.xz
dnbd3-290d3478f245bb7d2112bb781286a9fbae42b983.zip
[SERVER] Rewrite uplink queue handling
- Now uses linked lists instead of huge array - Does prefetch data on client requests - Can have multiple replication requests in-flight
Diffstat (limited to 'src/server/image.c')
-rw-r--r--src/server/image.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server/image.c b/src/server/image.c
index 86b6374..81ec479 100644
--- a/src/server/image.c
+++ b/src/server/image.c
@@ -340,7 +340,6 @@ dnbd3_image_t* image_byId(int imgId)
dnbd3_image_t* image_get(char *name, uint16_t revision, bool ensureFdOpen)
{
int i;
- const char *removingText = _removeMissingImages ? ", removing from list" : "";
dnbd3_image_t *candidate = NULL;
// Simple sanity check
const size_t slen = strlen( name );
@@ -1895,7 +1894,7 @@ static void* saveLoadAllCacheMaps(void* nix UNUSED)
// We're not replicating this image, if there's a cache map, reload
// it periodically, since we might read from a shared storage that
// another server instance is writing to.
- if ( full || !cache->unchanged && !image->problem.read ) {
+ if ( full || ( !cache->unchanged && !image->problem.read ) ) {
logadd( LOG_DEBUG2, "Reloading cache map of %s:%d", PIMG(image) );
dnbd3_cache_map_t *onDisk = image_loadCacheMap(image->path, image->virtualFilesize);
if ( onDisk == NULL ) {