]> git.sur5r.net Git - bacula/bacula/commitdiff
Don't swap volume twice
authorKern Sibbald <kern@sibbald.com>
Fri, 11 Apr 2008 20:39:07 +0000 (20:39 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 11 Apr 2008 20:39:07 +0000 (20:39 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6801 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/reserve.c

index d1fce56d977c01ca748ca8458f476efaa1765f97..f2c81f4f31b8d679a35c16503d020e7a6633e938 100644 (file)
@@ -390,8 +390,7 @@ VOLRES *reserve_volume(DCR *dcr, const char *VolumeName)
       /* Check if we are trying to use the Volume on a different drive */
       if (dev != vol->dev) {
          /* Caller wants to switch Volume to another device */
-         /*  ***FIXME*** don't let vol being swapped be stolen */
-         if (!vol->dev->is_busy()) {
+         if (!vol->dev->is_busy() && !vol->is_swapping()) {
             vol->set_swapping();
             dcr->swap_dev = vol->dev;   /* remember to get this vol */
             Dmsg3(dbglvl, "==== Swap vol=%s from dev=%s to %s\n",