From: Kern Sibbald Date: Fri, 25 Feb 2011 05:06:08 +0000 (+0100) Subject: Better fix for bug #1603 restart of Virtual Full X-Git-Tag: Release-7.0.0~1095 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a9d03aa114bd3701508bb6e39cb3f76b1741c652;p=bacula%2Fbacula Better fix for bug #1603 restart of Virtual Full --- diff --git a/bacula/src/dird/jobq.c b/bacula/src/dird/jobq.c index 42d2cea16d..026b0f84e9 100644 --- a/bacula/src/dird/jobq.c +++ b/bacula/src/dird/jobq.c @@ -663,7 +663,7 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) * Special test here since a Virtual Full gets marked * as a Full, so we look at the resource record */ - if (jcr->job->JobLevel == L_VIRTUAL_FULL) { + if (jcr->wasVirtualFull) { jcr->setJobLevel(L_VIRTUAL_FULL); } jobq_add(jq, jcr); /* queue the job to run again */ @@ -686,7 +686,7 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) * Special test here since a Virtual Full gets marked * as a Full, so we look at the resource record */ - if (jcr->job->JobLevel == L_VIRTUAL_FULL) { + if (jcr->wasVirtualFull) { njcr->setJobLevel(L_VIRTUAL_FULL); } else { njcr->setJobLevel(jcr->getJobLevel()); diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index 0375a0d0ad..59c33efb6f 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2009 Free Software Foundation Europe e.V. + Copyright (C) 2008-2011 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -41,7 +41,6 @@ * to do the backup. * When the File daemon finishes the job, update the DB. * - * Version $Id: $ */ #include "bacula.h" @@ -142,6 +141,8 @@ bool do_vbackup(JCR *jcr) ((STORE *)jcr->rstorage->first())->name(), ((STORE *)jcr->wstorage->first())->name()); + jcr->wasVirtualFull = true; /* remember where we came from */ + /* Print Job Start message */ Jmsg(jcr, M_INFO, 0, _("Start Virtual Backup JobId %s, Job=%s\n"), edit_uint64(jcr->JobId, ed1), jcr->Job); diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index adb760aa89..e4fecfacab 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -342,6 +342,7 @@ public: int32_t reschedule_count; /* Number of times rescheduled */ int32_t FDVersion; /* File daemon version number */ int64_t spool_size; /* Spool size for this job */ + bool wasVirtualFull; /* set if job was VirtualFull */ bool spool_data; /* Spool data in SD */ bool acquired_resource_locks; /* set if resource locks acquired */ bool term_wait_inited; /* Set when cond var inited */