Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
if (strcmp(vol->vol_name, VolumeName) == 0) {
Dmsg2(dbglvl, "=== set reserved vol=%s dev=%s\n", VolumeName,
vol->dev->print_name());
if (strcmp(vol->vol_name, VolumeName) == 0) {
Dmsg2(dbglvl, "=== set reserved vol=%s dev=%s\n", VolumeName,
vol->dev->print_name());
goto get_out; /* Volume already on this device */
} else {
/* Don't release a volume if it was reserved by someone other than us */
goto get_out; /* Volume already on this device */
} else {
/* Don't release a volume if it was reserved by someone other than us */
}
Dmsg2(dbglvl, "reserve_vol free vol=%s at %p\n", vol->vol_name, vol->vol_name);
free_volume(dev);
}
Dmsg2(dbglvl, "reserve_vol free vol=%s at %p\n", vol->vol_name, vol->vol_name);
free_volume(dev);
Dmsg3(dbglvl, "==== Swap vol=%s from dev=%s to %s\n",
VolumeName, vol->dev->print_name(), dev->print_name());
free_volume(dev); /* free any volume attached to our drive */
Dmsg3(dbglvl, "==== Swap vol=%s from dev=%s to %s\n",
VolumeName, vol->dev->print_name(), dev->print_name());
free_volume(dev); /* free any volume attached to our drive */
dev->set_unload(); /* Unload any volume that is on our drive */
dcr->dev = vol->dev; /* temp point to other dev */
slot = get_autochanger_loaded_slot(dcr); /* get slot on other drive */
dev->set_unload(); /* Unload any volume that is on our drive */
dcr->dev = vol->dev; /* temp point to other dev */
slot = get_autochanger_loaded_slot(dcr); /* get slot on other drive */
}
if (dev->vol->is_swapping()) {
Dmsg1(dbglvl, "vol_unused: vol being swapped on %s\n", dev->print_name());
}
if (dev->vol->is_swapping()) {
Dmsg1(dbglvl, "vol_unused: vol being swapped on %s\n", dev->print_name());
- debug_list_volumes("swapping vol cannot unreserve_volume");
+ Dmsg1(dbglvl, "=== clear in_use vol=%s\n", dev->vol->vol_name);
+ dev->vol->clear_in_use();
+ debug_list_volumes("swapping vol cannot free_volume");
/*
* If this is a tape, we do not free the volume, rather we wait
* until the autoloader unloads it, or until another tape is
/*
* If this is a tape, we do not free the volume, rather we wait
* until the autoloader unloads it, or until another tape is
*/
Dmsg4(dbglvl, "=== set not reserved vol=%s num_writers=%d dev_reserved=%d dev=%s\n",
dev->vol->vol_name, dev->num_writers, dev->num_reserved(), dev->print_name());
*/
Dmsg4(dbglvl, "=== set not reserved vol=%s num_writers=%d dev_reserved=%d dev=%s\n",
dev->vol->vol_name, dev->num_writers, dev->num_reserved(), dev->print_name());
dev->vol = NULL;
vol_list->remove(vol);
Dmsg2(dbglvl, "=== remove volume %s dev=%s\n", vol->vol_name, dev->print_name());
dev->vol = NULL;
vol_list->remove(vol);
Dmsg2(dbglvl, "=== remove volume %s dev=%s\n", vol->vol_name, dev->print_name());
/* Look through Autochangers first */
foreach_res(changer, R_AUTOCHANGER) {
Dmsg1(dbglvl, "Try match changer res=%s\n", changer->hdr.name);
/* Look through Autochangers first */
foreach_res(changer, R_AUTOCHANGER) {
Dmsg1(dbglvl, "Try match changer res=%s\n", changer->hdr.name);
- if (!rctx.device->autoselect) {
- Dmsg1(100, "Device %s not autoselect skipped.\n",
- rctx.device->hdr.name);
- continue; /* device is not available */
- }
/* Find resource, and make sure we were able to open it */
if (strcmp(rctx.device_name, changer->hdr.name) == 0) {
/* Try each device in this AutoChanger */
foreach_alist(rctx.device, changer->device) {
Dmsg1(dbglvl, "Try changer device %s\n", rctx.device->hdr.name);
/* Find resource, and make sure we were able to open it */
if (strcmp(rctx.device_name, changer->hdr.name) == 0) {
/* Try each device in this AutoChanger */
foreach_alist(rctx.device, changer->device) {
Dmsg1(dbglvl, "Try changer device %s\n", rctx.device->hdr.name);
+ if (!rctx.device->autoselect) {
+ Dmsg1(100, "Device %s not autoselect skipped.\n",
+ rctx.device->hdr.name);
+ continue; /* device is not available */
+ }