dev->Slot = 0; /* nothing loaded */
}
dev->clear_unload();
+ unlock_changer(dcr);
+
free_volume(dev); /* Free any volume associated with this drive */
free_pool_memory(changer);
- unlock_changer(dcr);
}
return ok;
}
dev->Slot = 0; /* nothing loaded */
Dmsg0(100, "Slot unloaded\n");
}
- free_volume(dev); /* Free any volume associated with this drive */
dev->clear_unload();
unlock_changer(dcr);
+
dev->dunlock();
+
+ free_volume(dev); /* Free any volume associated with this drive */
free_pool_memory(changer_cmd);
return ok;
}
if (dcr) {
dev = dcr->dev;
dev->dlock(); /* Use P to avoid indefinite block */
- if (!dev->is_open()) {
+ if (!dev->is_open() && !dev->is_busy()) {
Dmsg1(400, "Can %slabel. Device is not open\n", relabel?"re":"");
label_volume_if_ok(dcr, oldname, newname, poolname, slot, relabel);
dev->close();
General:
21May08
+kes Modify autochanger locking to attempt to avoid race
+ conditions.
+kes Make sure device not busy before doing label command.
kes Display open() errors except when polling. Previously too
many were suppressed. This should fix bug #1070.
kes Fix Win32 reparse points. Bacula will not recurse into any