]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Kluge match_voladdr to work with tape. All regress tests are ok
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 24 Dec 2008 16:04:53 +0000 (16:04 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 24 Dec 2008 16:04:53 +0000 (16:04 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8254 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/match_bsr.c

index db0ef9d95972c35afab01954c9941890e011f8ce..ee7274f117c070439db7b8b9393520dff2dcba87 100644 (file)
@@ -635,13 +635,20 @@ static int match_voladdr(BSR *bsr, BSR_VOLADDR *voladdr, DEV_RECORD *rec, bool d
    if (!voladdr) {
       return 1;                       /* no specification matches all */
    }
+
    /* For the moment, these tests work only with disk. */
    if (rec->state & REC_ISTAPE) {
-      return 1;                       /* All File records OK for this match */
+      uint32_t sFile = (voladdr->saddr)>>32;
+      uint32_t eFile = (voladdr->eaddr)>>32;
+      if (sFile <= rec->File && eFile >= rec->File) {
+         return 1;
+      }
    }
+
    uint64_t addr = get_record_address(rec);
-//  Dmsg3(dbglevel, "match_voladdr: saddr=%llu eaddr=%llu recaddr=%llu\n",
-//             volblock->saddr, volblock->eaddr, addr);
+   Dmsg6(dbglevel, "match_voladdr: saddr=%llu eaddr=%llu recaddr=%llu sfile=%u efile=%u recfile=%u\n",
+         voladdr->saddr, voladdr->eaddr, addr, voladdr->saddr>>32, voladdr->eaddr>>32, addr>>32);
+
    if (voladdr->saddr <= addr && voladdr->eaddr >= addr) {
       return 1;
    }