From 4bfb752c2a02c1f7bfcc2cb60fae969aed35ff79 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 24 Dec 2008 16:04:53 +0000 Subject: [PATCH] ebl Kluge match_voladdr to work with tape. All regress tests are ok git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8254 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/match_bsr.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bacula/src/stored/match_bsr.c b/bacula/src/stored/match_bsr.c index db0ef9d959..ee7274f117 100644 --- a/bacula/src/stored/match_bsr.c +++ b/bacula/src/stored/match_bsr.c @@ -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; } -- 2.39.5