From: Eric Bollengier Date: Wed, 24 Dec 2008 16:04:53 +0000 (+0000) Subject: ebl Kluge match_voladdr to work with tape. All regress tests are ok X-Git-Tag: Release-3.0.0~404 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d41a54df591e065f0bdad0dc63fda3b34cc4223;p=bacula%2Fbacula 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 --- 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; }