Dmsg2(200, "dir_update_vol_info. Release vol=%s dev=%s\n",
dev->VolCatInfo.VolCatName, dev->print_name());
}
- if (!dev->is_busy()) { /* if not being used */
+ if (dev->num_writers == 0) { /* if not being used */
+// if (!dev->is_busy()) { /* if not being used */
volume_unused(dcr); /* we obviously are not using the volume */
}
}
volume_unused(dcr);
}
unlock_volumes();
+ Dmsg3(100, "%d writers, %d reserve, dev=%s\n", dev->num_writers, dev->num_reserved(),
+ dev->print_name());
+ debug_list_volumes("acquire:release_device()");
+
/* If no writers, close if file or !CAP_ALWAYS_OPEN */
if (dev->num_writers == 0 && (!dev->is_tape() || !dev->has_cap(CAP_ALWAYSOPEN))) {
return true;
} else {
if (stat == W_TIMEOUT || stat == W_MOUNT) {
- Jmsg(jcr, M_MOUNT, 0, _(
+ Mmsg(dev->errmsg, _(
"Job %s waiting. Cannot find any appendable volumes.\n"
"Please use the \"label\" command to create a new Volume for:\n"
" Storage: %s\n"
dcr->pool_name,
dcr->media_type);
}
+ Jmsg(jcr, M_MOUNT, 0, "%s", dev->errmsg);
+ Dmsg1(100, "%s", dev->errmsg);
}
set_jcr_job_status(jcr, JS_WaitMedia);
bool find_suitable_device_for_job(JCR *jcr, RCTX &rctx);
int search_res_for_device(RCTX &rctx);
void release_reserve_messages(JCR *jcr);
+void debug_list_volumes(const char *imsg);
extern int reservations_lock_count;
extern int vol_list_lock_count;
debug_nolock = false
};
-static void debug_list_volumes(const char *imsg)
+void debug_list_volumes(const char *imsg)
{
VOLRES *vol;
POOL_MEM msg(PM_MESSAGE);
#undef VERSION
#define VERSION "2.3.20"
-#define BDATE "03 May 2008"
-#define LSMDATE "03May08"
+#define BDATE "07 May 2008"
+#define LSMDATE "07May08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
General:
+07May08
+kes Improve SD reserve debug code.
+kes Testing an improvement to free up volumes no longer in use.
03May08
kes Rework SD acquire for read to handle autochanger Volume
swapping.