From e658b30bebc2511ccc4f69310e8e2e7eed4c0156 Mon Sep 17 00:00:00 2001 From: Thorsten Engel Date: Mon, 24 Apr 2006 09:24:34 +0000 Subject: [PATCH] - make enable_vss persistent per backup job (cache it) git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2962 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/job.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 6c21857029..4e6d9b3fda 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1190,8 +1190,14 @@ static int backup_cmd(JCR *jcr) int SDJobStatus; char ed1[50], ed2[50]; + // capture state here, if client is backed up by multiple directors + // and one enables vss and the other does not then enable_vss can change + // between here and where its evaluated after the job completes. + BOOL bDoVSS = FALSE; + #ifdef WIN32_VSS - if (g_pVSSClient && enable_vss) + bDoVSS = g_pVSSClient && enable_vss; + if (bDoVSS) /* Run only one at a time */ P(vss_mutex); #endif @@ -1246,7 +1252,7 @@ static int backup_cmd(JCR *jcr) #ifdef WIN32_VSS /* START VSS ON WIN 32 */ - if (g_pVSSClient && enable_vss) { + if (bDoVSS) { if (g_pVSSClient->InitializeForBackup()) { /* tell vss which drives to snapshot */ char szWinDriveLetters[27]; @@ -1338,7 +1344,7 @@ cleanup: #ifdef WIN32_VSS /* STOP VSS ON WIN 32 */ /* tell vss to close the backup session */ - if (g_pVSSClient && enable_vss) { + if (bDoVSS) { if (g_pVSSClient->CloseBackup()) { /* inform user about writer states */ for (size_t i=0; iGetWriterCount(); i++) { -- 2.39.5