From: Eric Bollengier Date: Sun, 14 Dec 2008 18:38:59 +0000 (+0000) Subject: ebl tests are working, but the solution is not the best one... X-Git-Tag: Release-3.0.0~485 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bde33410e927f109b684fe682ed2924d2526632d;p=bacula%2Fbacula ebl tests are working, but the solution is not the best one... git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8157 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/testing/fix_1190.patch b/bacula/patches/testing/fix_1190.patch index 9e5451cf51..624c49f99a 100644 --- a/bacula/patches/testing/fix_1190.patch +++ b/bacula/patches/testing/fix_1190.patch @@ -1,7 +1,7 @@ -Index: src/stored/match_bsr.c +Index: match_bsr.c =================================================================== ---- src/stored/match_bsr.c (révision 8116) -+++ src/stored/match_bsr.c (copie de travail) +--- match_bsr.c (révision 8116) ++++ match_bsr.c (copie de travail) @@ -36,15 +36,6 @@ /* @@ -201,26 +201,27 @@ Index: src/stored/match_bsr.c } -// 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) { + 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; ++ uint32_t min = (volblock->sblock>DEFAULT_BLOCK_SIZE)?volblock->sblock-DEFAULT_BLOCK_SIZE: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) { ++// if (volblock->sblock <= rec->Block && volblock->eblock >= rec->Block) { ++ if (min <= rec->Block && max >= rec->Block) { return 1; } /* Once we get past last eblock, we are done */ -Index: src/stored/read_record.c +Index: read_record.c =================================================================== ---- src/stored/read_record.c (révision 8116) -+++ src/stored/read_record.c (copie de travail) +--- read_record.c (révision 8116) ++++ read_record.c (copie de travail) @@ -261,8 +261,8 @@ Dmsg2(100, "All done=(file:block) %u:%u\n", dev->file, dev->block_num); break; @@ -232,23 +233,34 @@ Index: src/stored/read_record.c rec->remainder = 0; rec->state &= ~REC_PARTIAL_RECORD; if (try_repositioning(jcr, rec, dcr)) { -@@ -346,6 +346,12 @@ +@@ -346,6 +346,9 @@ */ if (dev->file > bsr->volfile->sfile || (dev->file == bsr->volfile->sfile && dev->block_num > bsr->volblock->sblock)) { + 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; } if (verbose) { -Index: src/stored/bls.c +Index: parse_bsr.c =================================================================== ---- src/stored/bls.c (révision 8116) -+++ src/stored/bls.c (copie de travail) +--- parse_bsr.c (révision 8116) ++++ parse_bsr.c (copie de travail) +@@ -190,6 +190,9 @@ + for (bsr=root_bsr; bsr; bsr=bsr->next) { + bsr->root = root_bsr; + } ++ if (verbose) { ++ dump_bsr(root_bsr, true); ++ } + return root_bsr; + } + +Index: bls.c +=================================================================== +--- bls.c (révision 8116) ++++ bls.c (copie de travail) @@ -400,8 +400,8 @@ if (file_is_included(ff, attr->fname) && !file_is_excluded(ff, attr->fname)) { @@ -260,22 +272,10 @@ Index: src/stored/bls.c } 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 +Index: bscan.c =================================================================== ---- src/stored/bscan.c (révision 8146) -+++ src/stored/bscan.c (copie de travail) +--- bscan.c (révision 8146) ++++ bscan.c (copie de travail) @@ -420,9 +420,9 @@ } @@ -288,33 +288,3 @@ Index: src/stored/bscan.c } /* * Check for Start or End of Session Record -Index: src/stored/record.c -=================================================================== ---- src/stored/record.c (révision 8116) -+++ src/stored/record.c (copie de travail) -@@ -452,8 +452,8 @@ - rec->Block = block->BlockNumber; - rec->File = ((DEVICE *)block->dev)->file; - } else { -- rec->Block = ((DEVICE *)block->dev)->EndBlock; -- rec->File = ((DEVICE *)block->dev)->EndFile; -+ rec->Block = ((DEVICE *)block->dev)->block_num; -+ rec->File = ((DEVICE *)block->dev)->file; - } - - -Index: src/stored/block.c -=================================================================== ---- src/stored/block.c (révision 8116) -+++ src/stored/block.c (copie de travail) -@@ -1119,8 +1119,8 @@ - uint64_t addr = dev->file_addr + block->read_len - 1; - dcr->EndBlock = (uint32_t)addr; - dcr->EndFile = (uint32_t)(addr >> 32); -- dev->block_num = dcr->EndBlock; -- dev->file = dcr->EndFile; -+ dev->block_num = (uint32_t)(dev->file_addr); -+ dev->file = (uint32_t)(dev->file_addr >> 32); - } - dcr->VolMediaId = dev->VolCatInfo.VolMediaId; - dev->file_addr += block->read_len;