prune_list.JobId = (JobId_t *)malloc(sizeof(JobId_t) * prune_list.max_ids);
ua = new_ua_context(jcr);
-
db_lock(jcr->db);
/* Edit PoolId */
goto bail_out;
}
- Dmsg1(100, "num_ids=%d\n", ids.num_ids);
+ Dmsg1(100, "Volume prune num_ids=%d\n", ids.num_ids);
/* Visit each Volume and Prune it until we find one that is purged */
for (i=0; i<ids.num_ids; i++) {
memcpy(mr, &lmr, sizeof(lmr));
break; /* got a volume */
}
- } else {
- Dmsg2(100, "Nothing pruned MediaId=%d Volume=%s\n", (int)lmr.MediaId, lmr.VolumeName);
}
}
jcr->sd_msg_thread_done = true;
jcr->SD_msg_chan = 0;
pthread_cond_broadcast(&jcr->term_wait); /* wakeup any waiting threads */
- Dmsg1(100, "=== End msg_thread. use=%d\n", jcr->use_count());
+ Dmsg2(100, "=== End msg_thread. JobId=%d usecnt=%d\n", jcr->JobId, jcr->use_count());
free_jcr(jcr); /* release jcr */
db_thread_cleanup(); /* remove thread specific data */
}
/*
* Items needed:
* mr.PoolId must be set
+ * mr.StorageId should also be set
* jcr->wstore
* jcr->db
* jcr->pool
jcr->pool->purge_oldest_volume, jcr->pool->recycle_oldest_volume);
/* Find oldest volume to recycle */
ok = db_find_next_volume(jcr, jcr->db, -1, InChanger, mr);
- Dmsg1(400, "Find oldest=%d\n", ok);
+ Dmsg1(200, "Find oldest=%d Volume\n", ok);
if (ok && prune) {
UAContext *ua;
- Dmsg0(400, "Try purge.\n");
+ Dmsg0(200, "Try purge Volume.\n");
/*
* 7. Try to purging oldest volume only if not UA calling us.
*/