]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Make arguments to get_scratch_volume() in same order as other
authorKern Sibbald <kern@sibbald.com>
Thu, 12 Jul 2007 07:49:21 +0000 (07:49 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 12 Jul 2007 07:49:21 +0000 (07:49 +0000)
     such calls.
kes  Rework the prune_volumes() subroutine so that after purging and
     no volume found in desired pool, it will check for a scratch
     volume. This prevents recycling the whole scratch pool.
kes  Add code to status storage to print boffset_t (largefile support).

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5144 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/ReleaseNotes
bacula/src/dird/autoprune.c
bacula/src/dird/next_vol.c
bacula/src/dird/protos.h
bacula/src/stored/status.c
bacula/src/version.h
bacula/technotes-2.1

index 78f07b43a0280a37667ef91d1005937de8e58f83..6bff27a406607b772ed85f31c86be9a6d44c2b72 100644 (file)
@@ -1,6 +1,29 @@
               Technical notes on version 2.1
 
 General:
               Technical notes on version 2.1
 
 General:
+12Jul07
+kes  Make arguments to get_scratch_volume() in same order as other
+     such calls.
+kes  Rework the prune_volumes() subroutine so that after purging and
+     no volume found in desired pool, it will check for a scratch 
+     volume. This prevents recycling the whole scratch pool.
+kes  Add code to status storage to print boffset_t (largefile support).
+11Jul07
+kes  Move qwt (Graphics libarary for Qt4) to depkgs.
+kes  You now need a --with-qwt=<dir> to be able to build bat.
+kes  Update src/win32/cats/bacula_cats.def to include the new       
+     db_get_query_dbids() call on Win32.
+07Jul07
+kes  Correct a problem when selecting a scratch volume and moving
+     it to another pool that lost some columns.
+kes  Tweak some code in ua_update.c to use POOL_MEM instead of POOLMEM.
+kes  Enhance Autochanger error messages to include Volume and device name.
+kes  Rework prune_volumes() code to take account of InChanger flag,
+     and to handle recycling volumes going to the Scratch pool and
+     current pool because the RecyclePool directive.
+kes  Implement a better and more efficient db_get_query_dbids() to
+     handle creating and passing back a list of DBIds.
+
 Release 2.1.24 beta
 03Jul07
 kes  Start work on new more efficient DBId subroutine. First use
 Release 2.1.24 beta
 03Jul07
 kes  Start work on new more efficient DBId subroutine. First use
index 9a1c9ceaecf01d54a2bfa61cf83f76582720c947..aded88433860f033af6a1a15e1407b7885326585 100644 (file)
@@ -1,7 +1,7 @@
 
 
-          Release Notes for Bacula 2.1.24
+          Release Notes for Bacula 2.1.26
 
 
-  Bacula code: Total files = 516 Total lines = 244,807 (*.h *.c *.in)
+  Bacula code: Total files = 516 Total lines = 244,888 (*.h *.c *.in)
 
 This Director and Storage daemon must be upgraded at the same time,
 but they should be compatible with all 2.0.x File daemons, unless you
 
 This Director and Storage daemon must be upgraded at the same time,
 but they should be compatible with all 2.0.x File daemons, unless you
@@ -15,6 +15,17 @@ test before relying on it.  It should backup and restore reparse
 points.
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 points.
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
+Changes since Beta release 2.1.24
+- Add qwt graphics library (for Qt4) needed to build bat to the
+  depkgs-11Jul07.tar.gz package
+- You now need a --with-qwt=<dir> to be able to build bat.
+- Keep prune_volumes() from pruning the whole Scratch pool.
+- More debug output in status storage.
+- Correct moving a Scratch volume from pool to pool (some
+  critical columns were lost).
+- New more efficient db_get_query_dbids() -- not yet implemented
+  everywhere, but currently used in volume pruning.
+
 Changes since Beta release 2.1.22
 - Different locking in reservations and despooling systems,
   which means more micro-locking and less macro-locking, which
 Changes since Beta release 2.1.22
 - Different locking in reservations and despooling systems,
   which means more micro-locking and less macro-locking, which
index 9a91eb44e7bfc6cf30d1f054723d8baf561e6bed..df4cb5542db2150b1a15cf77cc5269423a87f35a 100644 (file)
@@ -190,9 +190,17 @@ bool prune_volumes(JCR *jcr, bool InChanger, MEDIA_DBR *mr)
           */
          if (ok && lmr.PoolId == mr->PoolId) {
             Dmsg2(050, "Vol=%s MediaId=%d purged.\n", lmr.VolumeName, (int)lmr.MediaId);
           */
          if (ok && lmr.PoolId == mr->PoolId) {
             Dmsg2(050, "Vol=%s MediaId=%d purged.\n", lmr.VolumeName, (int)lmr.MediaId);
-            mr = &lmr;             /* struct copy */
-            break;
+            mr = &lmr;                    /* struct copy */
+            break;                        /* got a volume */
          }
          }
+         /*
+          * We purged something but did not get a volume in the current pool.
+          *  It must be a scratch volume, so try to get it.
+          */
+         if (ok && get_scratch_volume(jcr, InChanger, mr)) {
+            break;                       /* got a volume */
+         }
+         ok = false;                     /* clear OK, in case we fall out */
       } else {
          Dmsg2(050, "Nothing pruned MediaId=%d Volume=%s\n", (int)lmr.MediaId, lmr.VolumeName);
       }
       } else {
          Dmsg2(050, "Nothing pruned MediaId=%d Volume=%s\n", (int)lmr.MediaId, lmr.VolumeName);
       }
index 603db2af446075e345174d84e3acb8363cd89bd5..ed54ccf7e120217f6e856367cebc68b0dae7450a 100644 (file)
@@ -39,9 +39,6 @@
 #include "bacula.h"
 #include "dird.h"
 
 #include "bacula.h"
 #include "dird.h"
 
-static bool get_scratch_volume(JCR *jcr, MEDIA_DBR *mr, bool InChanger);
-
-
 /*
  *  Items needed:
  *   mr.PoolId must be set
 /*
  *  Items needed:
  *   mr.PoolId must be set
@@ -105,7 +102,7 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index,
                   /*
                    * 5. Try pulling a volume from the Scratch pool
                    */ 
                   /*
                    * 5. Try pulling a volume from the Scratch pool
                    */ 
-                  ok = get_scratch_volume(jcr, mr, InChanger);
+                  ok = get_scratch_volume(jcr, InChanger, mr);
                }
                /*
                 * If we are using an Autochanger and have not found
                }
                /*
                 * If we are using an Autochanger and have not found
@@ -328,7 +325,7 @@ void check_if_volume_valid_or_recyclable(JCR *jcr, MEDIA_DBR *mr, const char **r
 
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
-static bool get_scratch_volume(JCR *jcr, MEDIA_DBR *mr, bool InChanger)
+bool get_scratch_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr)
 {
    MEDIA_DBR smr;
    POOL_DBR spr, pr;
 {
    MEDIA_DBR smr;
    POOL_DBR spr, pr;
index 480abaa3a7aeeec2925a63bcadcd81a4f99ae37f..10d27e31eb900526adbf4880fc3139c6305d3ecc 100644 (file)
@@ -152,6 +152,7 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index,
                                 bool create, bool purge);
 bool has_volume_expired(JCR *jcr, MEDIA_DBR *mr);
 void check_if_volume_valid_or_recyclable(JCR *jcr, MEDIA_DBR *mr, const char **reason);
                                 bool create, bool purge);
 bool has_volume_expired(JCR *jcr, MEDIA_DBR *mr);
 void check_if_volume_valid_or_recyclable(JCR *jcr, MEDIA_DBR *mr, const char **reason);
+bool get_scratch_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
 
 /* newvol.c */
 bool newVolume(JCR *jcr, MEDIA_DBR *mr);
 
 /* newvol.c */
 bool newVolume(JCR *jcr, MEDIA_DBR *mr);
index 103822a1de68bbfa3937178b20c51ce628b77818..cd11dab5280c5ac344b759fc2b21b64a404274bd 100644 (file)
@@ -94,6 +94,10 @@ void output_status(void sendit(const char *msg, int len, void *sarg), void *arg)
          edit_uint64_with_commas(sm_buffers, b4),
          edit_uint64_with_commas(sm_max_buffers, b5));
    sendit(msg, len, arg);
          edit_uint64_with_commas(sm_buffers, b4),
          edit_uint64_with_commas(sm_max_buffers, b5));
    sendit(msg, len, arg);
+   len = Mmsg(msg, "Sizes: boffset_t=%d size_t=%d int32_t=%d int64_t=%d\n", 
+         (int)sizeof(boffset_t), (int)sizeof(size_t), (int)sizeof(int32_t),
+         (int)sizeof(int64_t));
+   sendit(msg, len, arg);
 
    /*
     * List running jobs
 
    /*
     * List running jobs
index 9e4760fbb7ca3267719ac18e55afca4273c0dbb8..d2fd22d2176c5138ed9b285842026b6cee7dbe3d 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.1.25"
 
 #undef  VERSION
 #define VERSION "2.1.25"
-#define BDATE   "11 July 2007"
-#define LSMDATE "11Jul07"
+#define BDATE   "12 July 2007"
+#define LSMDATE "12Jul07"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */
index e26b9f3eb5e469ba629b37e5edd2c5fa67590357..8f97ec55741c8b0cd42a12183cb031fdc8ba957d 100644 (file)
@@ -1,6 +1,13 @@
               Technical notes on version 2.1
 
 General:
               Technical notes on version 2.1
 
 General:
+12Jul07
+kes  Make arguments to get_scratch_volume() in same order as other
+     such calls.
+kes  Rework the prune_volumes() subroutine so that after purging and
+     no volume found in desired pool, it will check for a scratch 
+     volume. This prevents recycling the whole scratch pool.
+kes  Add code to status storage to print boffset_t (largefile support).
 11Jul07
 kes  Move qwt (Graphics libarary for Qt4) to depkgs.
 kes  You now need a --with-qwt=<dir> to be able to build bat.
 11Jul07
 kes  Move qwt (Graphics libarary for Qt4) to depkgs.
 kes  You now need a --with-qwt=<dir> to be able to build bat.
@@ -16,6 +23,8 @@ kes  Rework prune_volumes() code to take account of InChanger flag,
      current pool because the RecyclePool directive.
 kes  Implement a better and more efficient db_get_query_dbids() to
      handle creating and passing back a list of DBIds.
      current pool because the RecyclePool directive.
 kes  Implement a better and more efficient db_get_query_dbids() to
      handle creating and passing back a list of DBIds.
+
+Release 2.1.24 beta
 03Jul07
 kes  Start work on new more efficient DBId subroutine. First use
      will be for recycling volume to Scratch inchanger.
 03Jul07
 kes  Start work on new more efficient DBId subroutine. First use
      will be for recycling volume to Scratch inchanger.