From 72104f2e83fa724f9667c876dca17a2c5ee9b2a2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 15 Dec 2015 17:45:44 +0100 Subject: [SERVER] Remove non-working images from list, plus refactoring Now that we can automatically load unknown images from disk on request, it makes sense to remove non-working images from the image list. On future requests, we will look for them on disk again, which is nice in case of temporary storage hickups. Also, some more ore less related locking has been refined (loading images, replicating images) --- src/server/globals.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/server/globals.c') diff --git a/src/server/globals.c b/src/server/globals.c index 1b0e8f3..5a7de89 100644 --- a/src/server/globals.c +++ b/src/server/globals.c @@ -12,6 +12,7 @@ bool _vmdkLegacyMode = false; volatile bool _shutdown = false; int _serverPenalty = 0; int _clientPenalty = 0; +bool _removeMissingImages = true; bool _isProxy = false; bool _proxyPrivateOnly = false; bool _backgroundReplication = true; @@ -32,6 +33,7 @@ static int ini_handler(void *custom UNUSED, const char* section, const char* key SAVE_TO_VAR_BOOL( dnbd3, isProxy ); SAVE_TO_VAR_BOOL( dnbd3, proxyPrivateOnly ); SAVE_TO_VAR_BOOL( dnbd3, backgroundReplication ); + SAVE_TO_VAR_BOOL( dnbd3, removeMissingImages ); SAVE_TO_VAR_INT( dnbd3, serverPenalty ); SAVE_TO_VAR_INT( dnbd3, clientPenalty ); SAVE_TO_VAR_INT( dnbd3, uplinkTimeout ); -- cgit v1.2.3-55-g7522