]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak block.c read to more closely simulate write for computing
authorKern Sibbald <kern@sibbald.com>
Sun, 14 Dec 2008 21:13:35 +0000 (21:13 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 14 Dec 2008 21:13:35 +0000 (21:13 +0000)
     block addresses and turn on disk block testing.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8160 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/block.c
bacula/src/stored/match_bsr.c
bacula/technotes-2.5

index a173b8eb475b8ea79c1575683ab49a535c6b5749..75538522f7caa56f8b9524f8e420713e44b3835b 100644 (file)
@@ -1116,11 +1116,15 @@ reread:
       dcr->EndBlock = dev->EndBlock;
       dcr->EndFile  = dev->EndFile;
    } else {
-      uint64_t addr = dev->file_addr + block->read_len - 1;
+      uint32_t len = block->read_len;
+      if (len > block->block_len) {
+         len = block->block_len;
+      }
+      uint64_t addr = dev->file_addr + len - 1;
       dcr->EndBlock = (uint32_t)addr;
       dcr->EndFile = (uint32_t)(addr >> 32);
-      dev->block_num = dcr->EndBlock;
-      dev->file = dcr->EndFile;
+      dev->block_num = dev->EndBlock = dcr->EndBlock;
+      dev->file = dev->EndFile = dcr->EndFile;
    }
    dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
    dev->file_addr += block->read_len;
index ca05a54580c3a71024a624e757b800caa386305c..0376275777c712be4185e10d8f2b2041c3a9137b 100644 (file)
@@ -612,7 +612,7 @@ static int match_volblock(BSR *bsr, BSR_VOLBLOCK *volblock, DEV_RECORD *rec, boo
     * files in all cases, so it is "turned off" by the following 
     * return statement.
     */
-   return 1;
+//   return 1;
 
 
    if (!volblock) {
index 1a9af7b0fa39907c5144ac0b63aab4bdd2a181f7..3b413cff0385439347933665d397cf3d41b11068 100644 (file)
@@ -10,6 +10,10 @@ filepattern (restore with regex in bsr)
 mixed priorities
 
 General:
+kes  Tweak block.c read to more closely simulate write for computing
+     block addresses and turn on disk block testing.
+14Dec08
+kes  Implement a crude 'list joblog' mostly for debugging.
 13Dec08
 kes  Fix Migration bug #1206 sql error with NULL FileSetId when no jobs
      to migrate.