From: Kern Sibbald Date: Sun, 4 Jan 2004 14:38:38 +0000 (+0000) Subject: Fix cancel of job waiting on mount to be a bit cleaner X-Git-Tag: Release-1.34.0~175 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7d333a22867e62987ea9e01d6b9953d34b2496a3;p=bacula%2Fbacula Fix cancel of job waiting on mount to be a bit cleaner git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@992 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index e63c615992..93f4209504 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -55,6 +55,17 @@ For 1.33 Testing/Documentation: - Add subsections to the Disaster Recovery index section. For 1.33 +- Look at find_next_volume() algorithm. Currently, it selects: + +---------+------------+---------------------+-----------+ + | MediaId | VolumeName | LastWritten | VolBytes | + +---------+------------+---------------------+-----------+ + | 3 | Test13 | 0000-00-00 00:00:00 | 1 | + | 4 | Test14 | 0000-00-00 00:00:00 | 1 | + | 1 | test11 | 2003-12-03 18:39:55 | 4,004,926 | + | 2 | test12 | 2004-01-04 15:25:56 | 2,078,691 | + +---------+------------+---------------------+-----------+ + but perhaps it should fill already used Volumes first, and use + Append volumes before Purged, or Recycled, ... - Volume "add"ed to Pool gets recycled in first use. VolBytes=0 - Get rid of 0 dates in LastWritten, ... - Make Bacula "poll a drive". diff --git a/bacula/src/stored/mount.c b/bacula/src/stored/mount.c index fa7dd67f0f..de54ad9684 100644 --- a/bacula/src/stored/mount.c +++ b/bacula/src/stored/mount.c @@ -88,6 +88,9 @@ mount_next_vol: return 0; } } + if (job_canceled(jcr)) { + return 0; + } Dmsg2(100, "After find_next_append. Vol=%s Slot=%d\n", jcr->VolCatInfo.VolCatName, jcr->VolCatInfo.Slot); @@ -124,6 +127,9 @@ mount_next_vol: Dmsg0(100, "Error return ask_sysop ...\n"); return 0; /* error return */ } + if (job_canceled(jcr)) { + return 0; + } Dmsg1(100, "want vol=%s\n", jcr->VolumeName); /* Open device */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 5d8fa78a25..f26e6de8ca 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,8 +2,8 @@ #undef VERSION #define VERSION "1.33" #define VSTRING "1" -#define BDATE "04 Jan 2003" -#define LSMDATE "04Jan03" +#define BDATE "04 Jan 2004" +#define LSMDATE "04Jan04" /* Debug flags */ #undef DEBUG