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;
}
(const Byte *)wbuf, (uLong)wsize)) == Z_BUF_ERROR)
{
/* The buffer size is too small, try with a bigger one */
- compress_len = compress_len + compress_len >> 1;
+ compress_len = compress_len + (compress_len >> 1);
compress_buf = check_pool_memory_size(compress_buf,
compress_len);
}
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);
#undef VERSION
#define VERSION "3.1.4"
-#define BDATE "12 October 2009"
-#define LSMDATE "12Oct09"
+#define BDATE "16 October 2009"
+#define LSMDATE "16Oct09"
#define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n"
#define BYEAR "2009" /* year for copyright messages in progs */
General:
+16Oct09
+kes Fix switching read device reported by Nicolae Mihalache <mache@abcpages.com>
15Oct09
kes Fix bug #1391 Job status improperly set due to subtle variable overload problem
13Oct09
check_for_zombie_jobs storage=File
stop_bacula
+#
+# The above restore should have restored some directories, but only
+# files that have README in their name. There should in fact, be
+# no other files restored COUNT_OTHER==0 and 13 README files restored.
+# We complain if there are less than 11
+#
COUNT_OTHER=`find ${tmp}/bacula-restores -type f | grep -v README | wc -l`
COUNT_README=`find ${tmp}/bacula-restores -type f | grep README | wc -l`
if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 11 ]; then
print_debug "Found non matching files"
+ print debug "Count_other=$COUNT_OTHER count_readme=$COUNT_README"
print_debug `find ${tmp}/bacula-restores -type f | grep -v README`
rstat=2
fi