From: Kern Sibbald Date: Fri, 11 Apr 2008 20:39:07 +0000 (+0000) Subject: Don't swap volume twice X-Git-Tag: Release-7.0.0~4716 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d097e158adcfd4e2c3fe874870fd380dcc558c7b;p=bacula%2Fbacula Don't swap volume twice git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6801 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/reserve.c b/bacula/src/stored/reserve.c index d1fce56d97..f2c81f4f31 100644 --- a/bacula/src/stored/reserve.c +++ b/bacula/src/stored/reserve.c @@ -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",