int vol_label_status;
int retry = 0;
- Dmsg1(950, "jcr->dcr=%p\n", jcr->dcr);
+ Dmsg2(950, "dcr=%p dev=%p\n", dcr, dcr->dev);
+ Dmsg2(950, "MediaType dcr=%s dev=%s\n", dcr->media_type, dev->device->media_type);
dev->dblock(BST_DOING_ACQUIRE);
if (dev->num_writers > 0) {
lock_reservations();
memset(&rctx, 0, sizeof(RCTX));
rctx.jcr = jcr;
+ jcr->read_dcr = dcr;
jcr->reserve_msgs = New(alist(10, not_owned_by_alist));
rctx.any_drive = true;
rctx.device_name = vol->device;
goto get_out;
}
}
+ Dmsg2(400, "MediaType dcr=%s dev=%s\n", dcr->media_type, dev->device->media_type);
dev->clear_unload();
} else {
dev->dunlock(); /* dunblock() unlock the device too */
}
- Dmsg1(950, "jcr->dcr=%p\n", jcr->dcr);
+ Dmsg2(950, "dcr=%p dev=%p\n", dcr, dcr->dev);
+ Dmsg2(950, "MediaType dcr=%s dev=%s\n", dcr->media_type, dev->device->media_type);
return ok;
}
rctx.suitable_device = true;
Dmsg1(dbglvl, "try reserve %s\n", rctx.device->hdr.name);
- dcr = new_dcr(rctx.jcr, rctx.jcr->dcr, rctx.device->dev);
+ if (rctx.store->append) {
+ dcr = new_dcr(rctx.jcr, rctx.jcr->dcr, rctx.device->dev);
+ } else {
+ dcr = new_dcr(rctx.jcr, rctx.jcr->read_dcr, rctx.device->dev);
+ }
if (!dcr) {
BSOCK *dir = rctx.jcr->dir_bsock;
dir->fsend(_("3926 Could not get dcr for device: %s\n"), rctx.device_name);