* tape labels.
*
* Kern Sibbald, MMV
+ *
*/
#include "bacula.h" /* pull in global headers */
if (!device->changer_command && changer->changer_command) {
device->changer_command = bstrdup(changer->changer_command);
}
+ /* ***BEEF*** */
if (!device->lock_command && changer->lock_command) {
device->lock_command = bstrdup(changer->lock_command);
}
/* Copy the resource into res_all */
memcpy(&res_all, res, sizeof(res_all));
+ if (strcmp(resources[resinx].name, "Dedupengine") == 0 &&
+ strcmp(res_all.hdr.name, "*Dedup*" /*default_legacy_dedupengine*/) == 0) {
+ continue; /* Don't display the dummy Dedupengine "*Dedup*" resource */
+ }
+
if (filter->resource_name) {
bool skip=true;
/* The Name should be at the first place, so this is not a real loop */
#ifdef SD_DEDUP_SUPPORT
DEDUPRES *dedup;
foreach_res(dedup, R_DEDUP) {
+ if (strcmp(dedup->hdr.name, "*Dedup*" /*default_legacy_dedupengine*/) == 0) {
+ break; /* this is the dummy "*Dedup* resource, test should be done in Storage */
+ }
if (dedup->driver_type == D_LEGACY_DRIVER) {
if (dedup->dedup_dir == NULL) {
Jmsg(NULL, M_FATAL, 0,
- _("Failed to initialize Dedup Legasy. DedupDirectory not defined for Dedup \"%s\"\n"),
+ _("Failed to initialize Dedup Legacy. DedupDirectory not defined for Dedup \"%s\"\n"),
dedup->hdr.name);
OK = false;
}
struct BSR_SESSTIME {
BSR_SESSTIME *next;
uint32_t sesstime;
- bool done; /* local done */
};
struct BSR_VOLFILE {
}
if (ok) {
if (do_update) {
- Dmsg2(dbglvl, "Correcting catalog for Volume \"%s\":\n%s", dcr->VolumeName, err.c_str());
+ Jmsg2(jcr, M_INFO, 0, _("Correcting catalog for Volume \"%s\":\n%s\n"), dcr->VolumeName, err.c_str());
if (!dir_update_volume_info(dcr, false, true)) {
Jmsg(jcr, M_WARNING, 0, _("Error updating Catalog\n"));
dcr->mark_volume_in_error();
void transfer::append_api_status(OutputWriter &ow)
{
lock_guard lg(m_stat_mutex);
+
Dmsg2(dbglvl, "transfer::append_api_status state=%d JobId=%d\n", m_state, m_job_id);
+
if (m_state > TRANS_STATE_PROCESSED) {
ow.get_output(OT_START_OBJ,
OT_STRING,"volume_name", NPRTB(m_volume_name),
void term(DCR *dcr);
virtual bool dedup_cmd(JCR *jcr);
virtual void *dedup_get_dedupengine() { return (void*)dedupengine; };
-
+ virtual bool is_fs_nearly_full(uint64_t threshold);
};
#endif /* DEDUP_DEV_H */
/* Interface between DEDUP and SD */
class DedupStoredInterfaceBase
{
+#if 0
+protected:
+ virtual void *do_rehydration_thread(void){return NULL;};
+ virtual int handle_rehydration_command(BSOCK *fd){return -1;};
+#endif
+
public:
DedupStoredInterfaceBase(JCR *jcr, DedupEngine *dedupengine) {};
virtual ~DedupStoredInterfaceBase() {};
- // deduplication
- virtual int start_deduplication() {return -1;};
- virtual void *wait_deduplication(bool emergency=false) {return NULL;};
- virtual void *do_deduplication_thread(void){return NULL;};
-
// rehydration
virtual int start_rehydration(){return -1;};
virtual void *wait_rehydration(bool emergency=false){return NULL;};
- virtual void *do_rehydration_thread(void){return NULL;};
- virtual int handle_rehydration_command(BSOCK *fd){return -1;};
virtual bool wait_flowcontrol_rehydration(int free_rec_count, int timeoutms){return false;};
virtual bool do_flowcontrol_rehydration(int free_rec_count, int retry_timeoutms=250){return false;};
virtual void warn_rehydration_eod() {};
DedupEngine *dedupengine;
int dedupengine_use_count;
char *dedup_err_msg; /* is set for any error status */
+ uint32_t max_container_open; /* the maximum number of simultaneously open container */
};
/*
if (now - last_heartbeat >= me->heartbeat_interval) {
/* Send Heartbeats
Note when sd_client is set, the SD is acting as an FD,
- but the SD has no code to receive heartbeats, so we
- skip sending them.
+ bug the SD has code to receive heartbeats, so we skip
+ sending them.
*/
if (jcr->file_bsock && !(jcr->is_JobType(JT_BACKUP) && jcr->sd_client)) {
jcr->file_bsock->signal(BNET_HEARTBEAT);