]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Add patch to fix #1173
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 23 Oct 2008 16:55:44 +0000 (16:55 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 23 Oct 2008 16:55:44 +0000 (16:55 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7883 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/testing/2.4.3-next-vol.patch [new file with mode: 0644]

diff --git a/bacula/patches/testing/2.4.3-next-vol.patch b/bacula/patches/testing/2.4.3-next-vol.patch
new file mode 100644 (file)
index 0000000..42ed0c9
--- /dev/null
@@ -0,0 +1,68 @@
+
+ This patch fix #1173 about problems during volume selection.
+
+ It can be applied to 2.4.3 (not to previous versions) with:
+
+  cd <bacula-source>
+  patch -p0 <2.4.3-next-vol.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+Index: src/dird/next_vol.c
+===================================================================
+--- src/dird/next_vol.c        (revision 7259)
++++ src/dird/next_vol.c        (working copy)
+@@ -94,28 +94,30 @@
+                 */
+                if (prune) {
+                   Dmsg0(150, "Call prune_volumes\n");
+-                  prune_volumes(jcr, InChanger, mr);
++                  ok = prune_volumes(jcr, InChanger, mr);
+                }
+-               ok = recycle_oldest_purged_volume(jcr, InChanger, mr);
+-               if (!ok && create) {
+-                  Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n",
+-                        ok, index, InChanger, mr->VolStatus);
+-                  /*
+-                   * 5. Try pulling a volume from the Scratch pool
+-                   */ 
+-                  ok = get_scratch_volume(jcr, InChanger, mr);
+-               }
+-               /*
+-                * If we are using an Autochanger and have not found
+-                * a volume, retry looking for any volume. 
+-                */
+-               if (InChanger) {
+-                  InChanger = false;
+-                  if (!ok) {
+-                     continue;           /* retry again accepting any volume */
+-                  }
+-               }
+-            }
++             if (!ok) {
++                ok = recycle_oldest_purged_volume(jcr, InChanger, mr);
++                if (!ok && create) {
++                   Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n",
++                         ok, index, InChanger, mr->VolStatus);
++                   /*
++                    * 5. Try pulling a volume from the Scratch pool
++                    */ 
++                   ok = get_scratch_volume(jcr, InChanger, mr);
++                   Dmsg4(050, "after get scratch volume ok=%d index=%d InChanger=%d Vstat=%s\n",
++                         ok, index, InChanger, mr->VolStatus);
++                }
++                /*
++                 * If we are using an Autochanger and have not found
++                 * a volume, retry looking for any volume. 
++                 */
++                if (!ok && InChanger) {
++                   InChanger = false;
++                   continue;           /* retry again accepting any volume */
++                }
++             }
++          }
+          }