jcr->pool_source = get_pool_memory(PM_MESSAGE);
pm_strcpy(jcr->pool_source, _("unknown source"));
}
- Dmsg2(500, "pool=%s (From %s)\n", jcr->pool->name(), jcr->pool_source);
- /* ****FIXME**** */
- if (jcr->JobType == JT_MIGRATE || jcr->JobType == JT_COPY) {
+
+ switch (jcr->JobType) {
+ case JT_VERIFY:
+ case JT_RESTORE:
+ case JT_COPY:
+ case JT_MIGRATE:
+ jcr->JobReads = true;
+ break;
+ case JT_BACKUP:
+ if (jcr->JobLevel == L_VIRTUAL_FULL) {
+ jcr->JobReads = true;
+ }
+ break;
+ default:
+ break;
+ }
+ if (jcr->JobReads) {
if (!jcr->rpool_source) {
jcr->rpool_source = get_pool_memory(PM_MESSAGE);
pm_strcpy(jcr->rpool_source, _("unknown source"));
jcr->job = job;
jcr->JobType = job->JobType;
jcr->JobStatus = JS_Created;
+
switch (jcr->JobType) {
case JT_ADMIN:
jcr->JobLevel = L_NONE;
break;
- case JT_VERIFY:
- case JT_RESTORE:
- case JT_COPY:
- case JT_MIGRATE:
- jcr->JobReads = true;
- jcr->JobLevel = job->JobLevel;
- break;
- case JT_BACKUP:
- jcr->JobLevel = job->JobLevel;
- if (jcr->JobLevel == L_VIRTUAL_FULL) {
- jcr->JobReads = true;
- }
- break;
default:
jcr->JobLevel = job->JobLevel;
break;
}
- if (jcr->JobReads) {
- if (!jcr->rpool_source) {
- jcr->rpool_source = get_pool_memory(PM_MESSAGE);
- pm_strcpy(jcr->rpool_source, _("unknown source"));
- }
- }
+
if (!jcr->fname) {
jcr->fname = get_pool_memory(PM_FNAME);
}
bool skip_this_jcr = false;
jcr->acquired_resource_locks = false;
- if (jcr->rstore == jcr->wstore) { /* deadlock */
+ if (jcr->rstore && jcr->rstore == jcr->wstore) { /* possible deadlock */
Jmsg(jcr, M_FATAL, 0, _("Job canceled. Attempt to read and write same device.\n"
" Read storage \"%s\" (From %s) -- Write storage \"%s\" (From %s)\n"),
jcr->rstore->name(), jcr->rstore_source, jcr->wstore->name(), jcr->wstore_source);
*/
bool do_vbackup_init(JCR *jcr)
{
- /* ***FIXME*** remove when implemented in job.c */
- if (!jcr->rpool_source) {
- jcr->rpool_source = get_pool_memory(PM_MESSAGE);
- pm_strcpy(jcr->rpool_source, _("unknown source"));
- }
-
if (!get_or_create_fileset_record(jcr)) {
Dmsg1(dbglevel, "JobId=%d no FileSet\n", (int)jcr->JobId);
return false;
return false;
}
}
- /* ***FIXME*** this is probably not needed */
+
if (!set_migration_wstorage(jcr, jcr->pool)) {
return false;
}
/*
* Now start a job with the Storage daemon
*/
+ Dmsg2(000, "rstorage=%p wstorage=%p\n", jcr->rstorage, jcr->wstorage);
Dmsg2(000, "Read store=%s, write store=%s\n",
((STORE *)jcr->rstorage->first())->name(),
((STORE *)jcr->wstorage->first())->name());
if (!allow_duplicate_job(jcr)) {
return false;
}
+ switch (jcr->JobLevel) {
+ case L_VERIFY_INIT:
+ case L_VERIFY_CATALOG:
+ case L_VERIFY_DISK_TO_CATALOG:
+ free_rstorage(jcr);
+ free_wstorage(jcr);
+ break;
+ case L_VERIFY_VOLUME_TO_CATALOG:
+ free_wstorage(jcr);
+ break;
+ case L_VERIFY_DATA:
+ break;
+ default:
+ Jmsg2(jcr, M_FATAL, 0, _("Unimplemented Verify level %d(%c)\n"), jcr->JobLevel,
+ jcr->JobLevel);
+ return false;
+ }
return true;
}
General:
+17Jul08
+kes Fix verify jobs to work again.
16Jul08
kes Virtual Backup tweaks -- it is close to working.
15Jul08