From: Kern Sibbald Date: Thu, 24 Feb 2011 06:51:16 +0000 (+0100) Subject: Rename incomplete to rerunning for clarity X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a7aacc7bee6e15bfc80ec9743f2b24506e3b3dcc;p=bacula%2Fbacula Rename incomplete to rerunning for clarity --- diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 19d6059263..69b6a8de38 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -246,7 +246,7 @@ bool send_accurate_current_files(JCR *jcr) if (jcr->is_canceled() || jcr->is_JobLevel(L_BASE)) { return true; } - if (!jcr->accurate && !jcr->incomplete) { + if (!jcr->accurate && !jcr->rerunning) { return true; } @@ -255,7 +255,7 @@ bool send_accurate_current_files(JCR *jcr) if (get_base_jobids(jcr, &jobids)) { jcr->HasBase = true; Jmsg(jcr, M_INFO, 0, _("Using BaseJobId(s): %s\n"), jobids.list); - } else if (!jcr->incomplete) { + } else if (!jcr->rerunning) { return true; } } else { @@ -270,7 +270,7 @@ bool send_accurate_current_files(JCR *jcr) } /* For incomplete Jobs, we add our own id */ - if (jcr->incomplete) { + if (jcr->rerunning) { edit_int64(jcr->JobId, ed1); jobids.add(ed1); } @@ -332,7 +332,7 @@ bool do_backup(JCR *jcr) } /* Print Job Start message */ - if (jcr->incomplete) { + if (jcr->rerunning) { Jmsg(jcr, M_INFO, 0, _("Restart Incomplete Backup JobId %s, Job=%s\n"), edit_uint64(jcr->JobId, ed1), jcr->Job); } else { @@ -348,7 +348,7 @@ bool do_backup(JCR *jcr) } /* For incomplete Jobs, we add our own id */ - if (jcr->incomplete) { + if (jcr->rerunning) { edit_int64(jcr->JobId, ed1); Mmsg(buf, "SELECT max(FileIndex) FROM File WHERE JobId=%s", ed1); if (db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) { diff --git a/bacula/src/dird/fd_cmds.c b/bacula/src/dird/fd_cmds.c index 4bb304102d..3a8072ba4a 100644 --- a/bacula/src/dird/fd_cmds.c +++ b/bacula/src/dird/fd_cmds.c @@ -296,25 +296,25 @@ bool send_level_command(JCR *jcr) BSOCK *fd = jcr->file_bsock; const char *accurate = jcr->accurate?"accurate_":""; const char *not_accurate = ""; - const char *incomplete = jcr->incomplete?" incomplete ":" "; + const char *rerunning = jcr->rerunning?" incomplete ":" "; /* * Send Level command to File daemon */ switch (jcr->getJobLevel()) { case L_BASE: - fd->fsend(levelcmd, not_accurate, "base", incomplete, 0); + fd->fsend(levelcmd, not_accurate, "base", rerunning, 0); break; /* L_NONE is the console, sending something off to the FD */ case L_NONE: case L_FULL: - fd->fsend(levelcmd, not_accurate, "full", incomplete, 0); + fd->fsend(levelcmd, not_accurate, "full", rerunning, 0); break; case L_DIFFERENTIAL: - fd->fsend(levelcmd, accurate, "differential", incomplete, 0); + fd->fsend(levelcmd, accurate, "differential", rerunning, 0); send_since_time(jcr); break; case L_INCREMENTAL: - fd->fsend(levelcmd, accurate, "incremental", incomplete, 0); + fd->fsend(levelcmd, accurate, "incremental", rerunning, 0); send_since_time(jcr); break; case L_SINCE: diff --git a/bacula/src/dird/jobq.c b/bacula/src/dird/jobq.c index 7c19ac69a8..4e05cbd5f6 100644 --- a/bacula/src/dird/jobq.c +++ b/bacula/src/dird/jobq.c @@ -637,7 +637,7 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) * Reschedule this job by cleaning it up, but * reuse the same JobId if possible. */ - jcr->incomplete = jcr->is_incomplete(); /* save incomplete status */ + jcr->rerunning = jcr->is_incomplete(); /* save incomplete status */ time_t now = time(NULL); jcr->reschedule_count++; jcr->sched_time = now + jcr->job->RescheduleInterval; @@ -656,7 +656,7 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) return false; } /* Only jobs with no output or Incomplete jobs can run on same JCR */ - if (jcr->JobBytes == 0 || jcr->incomplete) { + if (jcr->JobBytes == 0 || jcr->rerunning) { Dmsg2(2300, "Requeue job=%d use=%d\n", jcr->JobId, jcr->use_count()); V(jq->mutex); jobq_add(jq, jcr); /* queue the job to run again */ diff --git a/bacula/src/dird/msgchan.c b/bacula/src/dird/msgchan.c index 2b1d3f573e..b3f5e8fd11 100644 --- a/bacula/src/dird/msgchan.c +++ b/bacula/src/dird/msgchan.c @@ -51,7 +51,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static char jobcmd[] = "JobId=%s job=%s job_name=%s client_name=%s " "type=%d level=%d FileSet=%s NoAttr=%d SpoolAttr=%d FileSetMD5=%s " "SpoolData=%d WritePartAfterJob=%d PreferMountedVols=%d SpoolSize=%s " - "incomplete=%d VolSessionId=%d VolSessionTime=%d\n"; + "rerunning=%d VolSessionId=%d VolSessionTime=%d\n"; static char use_storage[] = "use storage=%s media_type=%s pool_name=%s " "pool_type=%s append=%d copy=%d stripe=%d\n"; static char use_device[] = "use device=%s\n"; @@ -194,7 +194,7 @@ bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, bool send_ fileset_name.c_str(), !jcr->pool->catalog_files, jcr->job->SpoolAttributes, jcr->fileset->MD5, jcr->spool_data, jcr->write_part_after_job, jcr->job->PreferMountedVolumes, - edit_int64(jcr->spool_size, ed2), jcr->incomplete, + edit_int64(jcr->spool_size, ed2), jcr->rerunning, jcr->VolSessionId, jcr->VolSessionTime); Dmsg1(100, ">stored: %s", sd->msg); if (bget_dirmsg(sd) > 0) { diff --git a/bacula/src/filed/accurate.c b/bacula/src/filed/accurate.c index 57317bd372..70ab5bbd33 100644 --- a/bacula/src/filed/accurate.c +++ b/bacula/src/filed/accurate.c @@ -190,7 +190,7 @@ bool accurate_finish(JCR *jcr) } if (jcr->accurate) { if (jcr->is_JobLevel(L_FULL)) { - if (!jcr->incomplete) { + if (!jcr->rerunning) { ret = accurate_send_base_file_list(jcr); } } else { @@ -258,7 +258,7 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt) ff_pkt->delta_seq = 0; - if (!jcr->accurate && !jcr->incomplete) { + if (!jcr->accurate && !jcr->rerunning) { return true; } @@ -285,7 +285,7 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt) decode_stat(elt.lstat, &statc, &LinkFIc); /* decode catalog stat */ - if (!jcr->incomplete && (jcr->getJobLevel() == L_FULL)) { + if (!jcr->rerunning && (jcr->getJobLevel() == L_FULL)) { opts = ff_pkt->BaseJobOpts; } else { opts = ff_pkt->AccurateOpts; @@ -391,7 +391,7 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt) ff_pkt->flags & (FO_MD5|FO_SHA1|FO_SHA256|FO_SHA512))) { - if (!*elt.chksum && !jcr->incomplete) { + if (!*elt.chksum && !jcr->rerunning) { Jmsg(jcr, M_WARNING, 0, _("Cannot verify checksum for %s\n"), ff_pkt->fname); stat = true; diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index b022dfbf87..3071af4e33 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1517,8 +1517,8 @@ static int level_cmd(JCR *jcr) if (strstr(dir->msg, "accurate")) { jcr->accurate = true; } - if (strstr(dir->msg, "incomplete")) { - jcr->incomplete = true; + if (strstr(dir->msg, "rerunning")) { + jcr->rerunning = true; } if (sscanf(dir->msg, "level = %s ", level) != 1) { goto bail_out; diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 24dbca6eeb..adb760aa89 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -265,7 +265,7 @@ public: bool keep_path_list; /* Keep newly created path in a hash */ bool accurate; /* true if job is accurate */ bool HasBase; /* True if job use base jobs */ - bool incomplete; /* finishing an incomplete job */ + bool rerunning; /* rerunning an incomplete job */ void *Python_job; /* Python Job Object */ void *Python_events; /* Python Events Object */ diff --git a/bacula/src/stored/append.c b/bacula/src/stored/append.c index 47af0d95bb..89c37166c6 100644 --- a/bacula/src/stored/append.c +++ b/bacula/src/stored/append.c @@ -193,7 +193,7 @@ bool do_append_data(JCR *jcr) * An incomplete job can start the file_index at any number. * otherwise, it must start at 1. */ - if (jcr->incomplete && file_index > 0 && last_file_index == 0) { + if (jcr->rerunning && file_index > 0 && last_file_index == 0) { goto fi_checked; } if (file_index > 0 && (file_index == last_file_index || diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 9fa42e1c52..c2d925965f 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -49,7 +49,7 @@ extern bool do_mac(JCR *jcr); static char jobcmd[] = "JobId=%d job=%127s job_name=%127s client_name=%127s " "type=%d level=%d FileSet=%127s NoAttr=%d SpoolAttr=%d FileSetMD5=%127s " "SpoolData=%d WritePartAfterJob=%d PreferMountedVols=%d SpoolSize=%s " - "incomplete=%d VolSessionId=%d VolSessionTime=%d\n"; + "rerunning=%d VolSessionId=%d VolSessionTime=%d\n"; /* Responses sent to Director daemon */ static char OKjob[] = "3000 OK Job SDid=%u SDtime=%u Authorization=%s\n"; @@ -88,7 +88,7 @@ bool job_cmd(JCR *jcr) &JobType, &level, fileset_name.c_str(), &no_attributes, &spool_attributes, fileset_md5.c_str(), &spool_data, &write_part_after_job, &PreferMountedVols, spool_size, - &jcr->incomplete, &jcr->VolSessionId, &jcr->VolSessionTime); + &jcr->rerunning, &jcr->VolSessionId, &jcr->VolSessionTime); if (stat != 17) { pm_strcpy(jcr->errmsg, dir->msg); dir->fsend(BAD_job, stat, jcr->errmsg); @@ -96,7 +96,7 @@ bool job_cmd(JCR *jcr) jcr->setJobStatus(JS_ErrorTerminated); return false; } - Dmsg3(100, "==== incomplete=%d VolSesId=%d VolSesTime=%d\n", jcr->incomplete, + Dmsg3(100, "==== rerunning=%d VolSesId=%d VolSesTime=%d\n", jcr->rerunning, jcr->VolSessionId, jcr->VolSessionTime); /* * Since this job could be rescheduled, we @@ -115,7 +115,7 @@ bool job_cmd(JCR *jcr) * the Resched flag is set and VolSessionId and VolSessionTime * are given to us (same as restarted job). */ - if (!jcr->incomplete) { + if (!jcr->rerunning) { jcr->VolSessionId = newVolSessionId(); jcr->VolSessionTime = VolSessionTime; }