]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix truncate bug free_volume problem
authorKern Sibbald <kern@sibbald.com>
Wed, 16 Dec 2015 09:49:40 +0000 (10:49 +0100)
committerKern Sibbald <kern@sibbald.com>
Wed, 16 Dec 2015 10:00:34 +0000 (11:00 +0100)
Conflicts:
bacula/src/stored/dircmd.c

bacula/src/stored/dircmd.c

index b86c1d7f41d8ace9325670ee278ff6503dfd18de..abf9f1a990751d22243ff3db3118ad4b71ad36cf 100644 (file)
@@ -576,12 +576,6 @@ static bool do_label(JCR *jcr, int relabel)
          dev = dcr->dev;
          ok = true;
          dev->Lock();                 /* Use P to avoid indefinite block */
-#ifdef DEVELOPER
-         if (chk_dbglvl(DT_VOLUME)) {
-            Dmsg0(0, "Waiting few seconds to force a bug...\n");
-            bmicrosleep(30, 0);
-         }
-#endif
          max_jobs = dev->max_concurrent_jobs;
          dev->max_concurrent_jobs = 1;
          bstrncpy(dcr->VolumeName, newname, sizeof(dcr->VolumeName));
@@ -615,8 +609,8 @@ static bool do_label(JCR *jcr, int relabel)
             label_volume_if_ok(dcr, oldname, newname, poolname, slot, relabel);
          }
          dev->max_concurrent_jobs = max_jobs;
+         volume_unused(dcr);
          dev->Unlock();
-         free_volume(dcr->dev);
       } else {
          dir->fsend(_("3999 Device \"%s\" not found or could not be opened.\n"), dev_name.c_str());
       }