]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #1323 about a problem when mounting a requested volume during a restore.
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 16 Jul 2009 13:03:53 +0000 (13:03 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 16 Jul 2009 13:03:53 +0000 (13:03 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9025 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/acquire.c
bacula/src/stored/dircmd.c
bacula/technotes

index 50e767b6114d85a2a7d6ae5bd0e8ecfd852b6486..b2bf07e29dc1aac11089cb608930d6cf272ebc5f 100644 (file)
@@ -286,7 +286,18 @@ default_path:
          if (!dir_ask_sysop_to_mount_volume(dcr, ST_READ)) {
             goto get_out;             /* error return */
          }
+
+         /* Volume info is always needed because of VolParts */
+         Dmsg1(150, "dir_get_volume_info vol=%s\n", dcr->VolumeName);
+         if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) {
+            Dmsg2(150, "dir_get_vol_info failed for vol=%s: %s\n", 
+                  dcr->VolumeName, jcr->errmsg);
+            Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
+         }
+         dev->set_load();                /* set to load volume */
+
          try_autochanger = true;      /* permit trying the autochanger again */
+
          continue;                    /* try reading again */
       } /* end switch */
       break;
index 19374afddf6d3216d2ad169ed35396ed4a95da31..3e1e613c6fd0bd9a1631971f50ceafa8e08dc8bc 100644 (file)
@@ -660,8 +660,9 @@ static bool mount_cmd(JCR *jcr)
             /* Someone is waiting, wake him */
             Dmsg0(100, "Waiting for mount. Attempting to wake thread\n");
             dev->set_blocked(BST_MOUNT);
-            dir->fsend("3001 OK mount. Device=%s\n", 
-               dev->print_name());
+            dir->fsend("3001 OK mount requested. %sDevice=%s\n", 
+                       slot>0?_("Specified slot ignored. "):"",
+                       dev->print_name());
             pthread_cond_broadcast(&dev->wait_next_vol);
             Dmsg1(100, "JobId=%u broadcast wait_device_release\n", (uint32_t)dcr->jcr->JobId);
             pthread_cond_broadcast(&wait_device_release);
index e25e9a4758e932bfab24f18661f9a8d685fce8a4..59fd42acfd31ff1a4816f11ec9c77459ac769fee 100644 (file)
@@ -2,6 +2,9 @@
           
 General:
 
+16Jul09
+ebl  Fix #1323 about a problem when mounting a requested volume
+     during a restore.
 15Jul09
 kes  Make CONF::init header and .c file agree about types.
      Reported by "Eli Shemer" <elish@consist.co.il>