edit_int64(jcr->JobId, ed1));
goto get_out;
}
- volume_unused(dcr); /* release any current volume */
jcr->CurReadVolume++;
for (i=1; i<jcr->CurReadVolume; i++) {
vol = vol->next;
dev->clear_read(); /* clear read bit */
Dmsg0(100, "dir_update_vol_info. Release0\n");
dir_update_volume_info(dcr, false, false); /* send Volume info to Director */
+ volume_unused(dcr);
} else if (dev->num_writers > 0) {
/*
if (!dev->num_writers && dev->can_write() && dev->block_num > 0) {
dev->weof(1);
write_ansi_ibm_labels(dcr, ANSI_EOF_LABEL, dev->VolHdr.VolumeName);
+ volume_unused(dcr);
}
if (!dev->at_weot()) {
dev->VolCatInfo.VolCatFiles = dev->file; /* set number of files */
}
/*
- * Remove any reservation from a drive and if no one is using
- * the volume, mark it unused.
+ * Remove any reservation from a drive and tell the system
+ * that the volume is unused at least by us.
*/
void unreserve_device(DCR *dcr)
{
#endif
Dmsg2(dbglvl, "mark released. num_writers=%d reserved=%d\n",
dev->num_writers, dev->reserved_device);
+#ifdef xxx
+ if (dev->num_writers > 0 || dev->reserved_device > 0) {
+ ASSERT(0);
+ }
+#endif
/*
* If this is a tape, we do not free the volume, rather we wait
if (dcr->volume_in_use && !rctx.PreferMountedVols) {
rctx.PreferMountedVols = true;
if (dcr->VolumeName[0]) {
- volume_unused(dcr);
+ // volume_unused(dcr);
}
goto bail_out;
}
*/
if (dcr->dev->num_writers != 0) {
if (dcr->VolumeName[0]) {
- volume_unused(dcr);
+ // volume_unused(dcr);
}
goto bail_out;
}
#undef VERSION
#define VERSION "2.3.8"
-#define BDATE "02 January 2008"
-#define LSMDATE "02Jan08"
+#define BDATE "06 January 2008"
+#define LSMDATE "06Jan08"
#define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */