]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/testing/fix_1190.patch
ebl cleanup
[bacula/bacula] / bacula / patches / testing / fix_1190.patch
1 Index: src/stored/match_bsr.c
2 ===================================================================
3 --- src/stored/match_bsr.c      (rĂ©vision 8116)
4 +++ src/stored/match_bsr.c      (copie de travail)
5 @@ -317,6 +317,7 @@
6           return_bsr = bsr;
7        }
8     }
9 +   Dmsg1(dbglevel, "find_smallest_volfile done=%i\n", return_bsr->done);
10     return return_bsr;
11  }
12  
13 @@ -607,14 +608,6 @@
14  
15  static int match_volblock(BSR *bsr, BSR_VOLBLOCK *volblock, DEV_RECORD *rec, bool done)
16  {
17 -   /*
18 -    * Currently block matching does not work correctly for disk
19 -    * files in all cases, so it is "turned off" by the following 
20 -    * return statement.
21 -    */
22 -   return 1;
23 -
24 -
25     if (!volblock) {
26        return 1;                       /* no specification matches all */
27     }
28 Index: src/stored/read_record.c
29 ===================================================================
30 --- src/stored/read_record.c    (rĂ©vision 8116)
31 +++ src/stored/read_record.c    (copie de travail)
32 @@ -160,7 +160,6 @@
33           }
34        }
35        Dmsg2(dbglvl, "Read new block at pos=%u:%u\n", dev->file, dev->block_num);
36 -#ifdef if_and_when_FAST_BLOCK_REJECTION_is_working
37        /* this does not stop when file/block are too big */
38        if (!match_bsr_block(jcr->bsr, block)) {
39           if (try_repositioning(jcr, rec, dcr)) {
40 @@ -168,7 +167,6 @@
41           }
42           continue;                    /* skip this record */
43        }
44 -#endif
45  
46        /*
47         * Get a new record for each Job as defined by
48 @@ -338,6 +336,7 @@
49        rec->Block = 0;
50        return true;
51     }
52 +   Dmsg1(dbglvl, "try_repositioning bsr=0x%p\n", bsr);
53     if (bsr) {
54        /*
55         * ***FIXME*** gross kludge to make disk seeking work.  Remove
56 @@ -345,8 +344,8 @@
57         *   completed.
58         */
59        if (dev->file > bsr->volfile->sfile ||             
60 -         (dev->file == bsr->volfile->sfile && dev->block_num > bsr->volblock->sblock)) {
61 -         return false;
62 +          (dev->file == bsr->volfile->sfile && dev->block_num > bsr->volblock->sblock)) {
63 +         Jmsg(jcr, M_ERROR, 0, "Will read back to the media!!! %i > %i || (%i == %i && %i > %i)\n", dev->file, bsr->volfile->sfile, dev->file, bsr->volfile->sfile, dev->block_num, bsr->volblock->sblock);
64        }
65        if (verbose) {
66           Jmsg(jcr, M_INFO, 0, _("Reposition from (file:block) %u:%u to %u:%u\n"),