and possibly bug #1346.
}
goto default_path;
case VOL_NAME_ERROR:
- Dmsg0(50, "Vol name error.\n");
+ Dmsg3(50, "Vol name=%s want=%s drv=%s.\n", dev->VolHdr.VolumeName,
+ dcr->VolumeName, dev->print_name());
if (dev->is_volume_to_unload()) {
goto default_path;
}
if (!unload_autochanger(dcr, -1)) {
/* at least free the device so we can re-open with correct volume */
dev->close();
+ free_volume(dev);
}
dev->set_load();
/* Fall through */
*/
if (dev->requires_mount()) {
dev->close();
+ free_volume(dev);
}
/* Call autochanger only once unless ask_sysop called */
if (dev->num_writers == 0 && (!dev->is_tape() || !dev->has_cap(CAP_ALWAYSOPEN))) {
dvd_remove_empty_part(dcr); /* get rid of any empty spool part */
dev->close();
+ free_volume(dev);
}
/* Fire off Alert command and include any output */
if (!unload_autochanger(dcr, -1)) {
/* ***FIXME**** what is this ???? */
dev->close();
+ free_volume(dev);
}
if (dev->is_unmountable() && !dev->unmount(0)) {
dir->fsend(_("3907 %s"), dev->bstrerror());
clear_thread_id(dev->no_wait_id);
if (!unload_autochanger(dcr, -1)) {
dev->close();
+ free_volume(dev);
}
if (dev->is_unmountable() && !dev->unmount(0)) {
dir->fsend(_("3907 %s"), dev->bstrerror());
if (reserve_volume(dcr, dev->VolHdr.VolumeName) == NULL) {
Mmsg2(jcr->errmsg, _("Could not reserve volume %s on %s\n"),
dev->VolHdr.VolumeName, dev->print_name());
+ Dmsg2(150, "Could not reserve volume %s on %s\n", dev->VolHdr.VolumeName, dev->print_name());
stat = VOL_NAME_ERROR;
goto bail_out;
}
autochanger = false;
VolCatInfo.Slot = 0;
ask = retry >= 2;
+ do_find = true; /* do find_a_volume if we retry */
}
Dmsg1(150, "autoload_dev returns %d\n", autochanger);
/*
if (dev->poll && dev->has_cap(CAP_CLOSEONPOLL)) {
dev->close();
+ free_volume(dev);
}
/* Ensure the device is open */
/* Needed, so the medium can be changed */
if (dev->requires_mount()) {
dev->close();
+ free_volume(dev);
}
goto check_next_volume;
}
Dmsg1(100, "=== set in_use vol=%s\n", dev->vol->vol_name);
dev->vol->set_in_use();
dev->VolHdr.VolumeName[0] = 0; /* don't yet have right Volume */
+ } else {
+ Dmsg1(100, "No vol on dev=%s\n", dev->print_name());
+ }
+ if (dev->swap_dev->vol) {
+ Dmsg2(100, "Vol=%s on dev=%s\n", dev->swap_dev->vol->vol_name,
+ dev->swap_dev->print_name());
}
dev->swap_dev = NULL;
}
General:
+23Aug09
+kes Free Volume in several places. Fixes virtual-changer problem
+ and possibly bug #1346.
+kes Add SD Volume debug code
22Aug09
kes Don't print different filesystem. Will not descend
message if directory explicitly excluded