]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/accurate.c
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / filed / accurate.c
index 3479cd5ecaa5cbf74253c8c73be95a77d31c819f..04bbfe43ab168b851f7012710d2d341221a31c57 100644 (file)
@@ -213,7 +213,7 @@ static bool accurate_add_file(JCR *jcr, uint32_t len,
    CurFile *item;
 
    /* we store CurFile, fname and ctime/mtime in the same chunk 
-    * we need some extra bytes to handle an empty chksum
+    * we need one extra byte to handle an empty chksum
     */
    item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3);
    item->seen = 0;
@@ -259,6 +259,7 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
    CurFile elt;
 
    ff_pkt->delta_seq = 0;
+   ff_pkt->accurate_found = false;
 
    if (!jcr->accurate && !jcr->rerunning) {
       return true;
@@ -278,13 +279,9 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
       goto bail_out;
    }
 
+   ff_pkt->accurate_found = true;
    ff_pkt->delta_seq = elt.delta_seq;
 
-   if (elt.seen) { /* file has been seen ? */
-      Dmsg1(dbglvl, "accurate %s (already seen)\n", fname);
-      goto bail_out;
-   }
-
    decode_stat(elt.lstat, &statc, sizeof(statc), &LinkFIc); /* decode catalog stat */
 
    if (!jcr->rerunning && (jcr->getJobLevel() == L_FULL)) {
@@ -380,7 +377,9 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
             stat = true;
          }
          break;
-
+      case 'A':                 /* Always backup a file */
+         stat = true;
+         break;
       /* TODO: cleanup and factorise this function with verify.c */
       case '5':                /* compare MD5 */
       case '1':                /* compare SHA1 */
@@ -496,7 +495,7 @@ int accurate_cmd(JCR *jcr)
    BSOCK *dir = jcr->dir_bsock;
    int lstat_pos, chksum_pos;
    int32_t nb;
-   uint32_t delta_seq;
+   uint16_t delta_seq;
 
    if (job_canceled(jcr)) {
       return true;