]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fix bug when restoring with a wrong mediatype
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 19 Jun 2008 09:49:40 +0000 (09:49 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 19 Jun 2008 09:49:40 +0000 (09:49 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7169 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/2.4.1-restore-wrong-mediatype.patch [new file with mode: 0644]
bacula/src/stored/acquire.c
bacula/technotes-2.3

diff --git a/bacula/patches/2.4.1-restore-wrong-mediatype.patch b/bacula/patches/2.4.1-restore-wrong-mediatype.patch
new file mode 100644 (file)
index 0000000..6df1220
--- /dev/null
@@ -0,0 +1,26 @@
+ This patch fixes complex restore where users choose a storage that doesn't
+ have the requested MediaType.
+
+ Apply this patch to version 2.4.1 with:
+
+ cd <bacula-source>
+ patch -p0 < patches/2.4.1-restore-wrong-mediatype.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/acquire.c
+===================================================================
+--- src/stored/acquire.c       (revision 7148)
++++ src/stored/acquire.c       (working copy)
+@@ -331,6 +331,8 @@
+     */
+    if (dev->is_blocked()) {
+       dev->dunblock(DEV_LOCKED);
++   } else {
++      dev->dunlock();               /* dunblock() unlock the device too */
+    }
+    Dmsg1(950, "jcr->dcr=%p\n", jcr->dcr);
+    return ok;
index 37ff22cbee26f1d0a3c6a0acd405ade6b9d7083e..55489403b994e1d84657c9a7956355bba6c83d68 100644 (file)
@@ -331,6 +331,8 @@ get_out:
     */
    if (dev->is_blocked()) {
       dev->dunblock(DEV_LOCKED);
+   } else {
+      dev->dunlock();               /* dunblock() unlock the device too */
    }
    Dmsg1(950, "jcr->dcr=%p\n", jcr->dcr);
    return ok;
index 0699fe85f775cabe5e2eab1bf0729b595182d95d..98e36674376ee3c47eb878f3906fa56908c4dfb2 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.2
 
 General:
+19Jun08
+ebl  Fix bug when starting a restore on a storage that doesn't
+     have the requested MediaType.
 18Jun08
 kes  More work on word alignments -- eliminate all ints from 
      the configuration routines.