From 590209cb53edd970f01960238c8cbd91741bddd8 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 16 Jun 2008 15:25:50 +0000 Subject: [PATCH] ebl Try to fix little bug in volume selection git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7150 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/testing/next_vol.patch | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 bacula/patches/testing/next_vol.patch diff --git a/bacula/patches/testing/next_vol.patch b/bacula/patches/testing/next_vol.patch new file mode 100644 index 0000000000..0789934e24 --- /dev/null +++ b/bacula/patches/testing/next_vol.patch @@ -0,0 +1,56 @@ +Index: src/dird/next_vol.c +=================================================================== +--- src/dird/next_vol.c (revision 7148) ++++ 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 */ ++ } ++ } ++ } + } + + -- 2.39.5