bool ok = do_get_volume_info(dcr);
if (ok) {
if (!is_volume_in_use(dcr)) {
- Dmsg0(400, "dir_find_next_appendable_volume return true\n");
+ Dmsg1(100, "Attempt reserve. Vol=%s\n", dcr->VolumeName);
if (reserve_volume(dcr, dcr->VolumeName) == 0) {
Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName,
dcr->dev->print_name());
}
V(vol_info_mutex);
unlock_reservations();
+ Dmsg1(100, "dir_find_next_appendable_volume return true. vol=%s\n",
+ dcr->VolumeName);
return true;
} else {
Dmsg1(100, "Volume %s is in use.\n", dcr->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 */
+ Dmsg2(dbglvl, "==== Swap from dev=%s to %s\n",
+ dev->print_name(), vol->dev->print_name());
switch_device(dcr, vol->dev);
dev = vol->dev;
+ bstrncpy(dcr->VolumeName, VolumeName, sizeof(dcr->VolumeName));
#ifdef xxx
if (!vol->dev->is_busy()) {
/* OK to move it -- I'm not sure this will work */