 +   Dmsg3(dbglevel, "match_volblock: sblock=%u eblock=%u recblock=%u\n",
 +         volblock->sblock, volblock->eblock, rec->Block);
 +
++   /* FIXME */
++   /* Don't reject the call if we are called with a small offset */
 +   uint32_t min = (volblock->sblock)?volblock->sblock-1:0;
++
++   /* We have call where rec->Block is the block after EndBlock 
++    * But, we are already decoding rec->Block-1Block records
++    */
++   uint32_t max = volblock->eblock+DEFAULT_BLOCK_SIZE;
     if (volblock->sblock <= rec->Block && volblock->eblock >= rec->Block) {
++//   if (min <= rec->Block && max >= rec->Block) {
        return 1;
     }
-@@ -641,6 +648,7 @@
-       bsr->root->reposition = true;
-       Dmsg2(dbglevel, "bsr done from volblock rec=%u voleblock=%u\n",
-          rec->Block, volblock->eblock);
-+      dump_bsr(bsr, false)
-    }
-    return 0;
- }
+    /* Once we get past last eblock, we are done */
 Index: src/stored/read_record.c
 ===================================================================
 --- src/stored/read_record.c	(révision 8116)
 +++ src/stored/read_record.c	(copie de travail)
-@@ -346,7 +346,10 @@
+@@ -261,8 +261,8 @@
+                Dmsg2(100, "All done=(file:block) %u:%u\n", dev->file, dev->block_num);
+                break;
+             } else if (rec->match_stat == 0) {  /* no match */
+-               Dmsg4(100, "BSR no match: clear rem=%d FI=%d before set_eof pos %u:%u\n",
+-                  rec->remainder, rec->FileIndex, dev->file, dev->block_num);
++               Dmsg7(100, "BSR no match: clear rem=%d FI=%d rec->Block=%d dev->LastBlock=%d dev->EndBlock=%d before set_eof pos %u:%u\n",
++                     rec->remainder, rec->FileIndex, rec->Block, dev->LastBlock, dev->EndBlock, dev->file, dev->block_num);
+                rec->remainder = 0;
+                rec->state &= ~REC_PARTIAL_RECORD;
+                if (try_repositioning(jcr, rec, dcr)) {
+@@ -346,6 +346,12 @@
         */
        if (dev->file > bsr->volfile->sfile ||             
           (dev->file == bsr->volfile->sfile && dev->block_num > bsr->volblock->sblock)) {
--         return false;
++         Dmsg4(dbglvl, _("Reposition from (file:block) %u:%u to %u:%u\n"),
++            dev->file, dev->block_num, bsr->volfile->sfile,
++            bsr->volblock->sblock);
 +         Jmsg(jcr, M_ERROR, 0, _("Reposition from (file:block) %u:%u to %u:%u\n"),
 +            dev->file, dev->block_num, bsr->volfile->sfile,
 +            bsr->volblock->sblock);
-+         //return false;
+          return false;
        }
        if (verbose) {
-          Jmsg(jcr, M_INFO, 0, _("Reposition from (file:block) %u:%u to %u:%u\n"),
 Index: src/stored/bls.c
 ===================================================================
 --- src/stored/bls.c	(révision 8116)

    return return_bsr;
 }
 
@@ -386,8 +397,6 @@
          rec->Block, bsr->volblock->sblock, bsr->volblock->eblock);
       goto no_match;

          }
          print_ls_output(jcr, attr);
          num_files++;
Index: src/stored/parse_bsr.c
===================================================================
--- src/stored/parse_bsr.c	(révision 8116)
+++ src/stored/parse_bsr.c	(copie de travail)
@@ -190,6 +190,7 @@
    for (bsr=root_bsr; bsr; bsr=bsr->next) {
       bsr->root = root_bsr;
    }
+   dump_bsr(root_bsr, true);
    return root_bsr;
 }
 
Index: src/stored/bscan.c
===================================================================
--- src/stored/bscan.c	(révision 8146)
