 ===================================================================
 --- src/stored/block.c	(révision 8116)
 +++ src/stored/block.c	(copie de travail)
+@@ -609,7 +609,7 @@
+       dev->block_num++;
+    } else {
+       /* Save address of block just written */
+-      uint64_t addr = dev->file_addr + wlen - 1;
++      uint64_t addr = dev->file_addr + wlen;
+       dcr->EndBlock = (uint32_t)addr;
+       dcr->EndFile = (uint32_t)(addr >> 32);
+       dev->block_num = dcr->EndBlock;
 @@ -1116,7 +1116,7 @@
        dcr->EndBlock = dev->EndBlock;
        dcr->EndFile  = dev->EndFile;

+   Dmsg3(dbglevel, "match_volblock: sblock=%u eblock=%u recblock=%u\n",
+         volblock->sblock, volblock->eblock, rec->Block);
+
    if (volblock->sblock <= rec->Block && volblock->eblock >= rec->Block) {
       return 1;
    }
Index: src/stored/bscan.c
===================================================================
--- src/stored/bscan.c	(révision 8146)

-         bsr_sfile = vf->sfile;
+/*
+ * Get the smallest block number from this volblock part
+ * Don't use "done" elements
+ */
+static bool get_smallest_volblock(BSR_VOLBLOCK *vb, uint32_t *ret)
+{
