From: Kern Sibbald Date: Thu, 9 Oct 2003 15:07:22 +0000 (+0000) Subject: Fix fast block rejection X-Git-Tag: Release-7.0.0~9964 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e15d4ce0f83148ad4eddb48c48c79c3f1274039;p=bacula%2Fbacula Fix fast block rejection git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@739 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index eb0a4758ec..410cbb5d36 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -241,7 +241,7 @@ static void terminate_dird(int sig) delete_pid_file(director->pid_directory, "bacula-dir", director->DIRport); stop_watchdog(); - signal(SIGCHLD, SIG_IGN); /* don't worry about children now */ +// signal(SIGCHLD, SIG_IGN); /* don't worry about children now */ term_scheduler(); if (runjob) { free(runjob); diff --git a/bacula/src/stored/match_bsr.c b/bacula/src/stored/match_bsr.c index 1aaef0e755..1098527c6b 100755 --- a/bacula/src/stored/match_bsr.c +++ b/bacula/src/stored/match_bsr.c @@ -77,10 +77,16 @@ int match_bsr_block(BSR *bsr, DEV_BLOCK *block) return 1; /* cannot fast reject */ } - if (!match_block_sesstime(bsr, bsr->sesstime, block)) { - return 0; + for ( ; bsr; bsr=bsr->next) { + if (!match_block_sesstime(bsr, bsr->sesstime, block)) { + continue; + } + if (!match_block_sessid(bsr, bsr->sessid, block)) { + continue; + } + return 1; } - return match_block_sessid(bsr, bsr->sessid, block); + return 0; } static int match_block_sesstime(BSR *bsr, BSR_SESSTIME *sesstime, DEV_BLOCK *block) diff --git a/bacula/src/stored/parse_bsr.c b/bacula/src/stored/parse_bsr.c index 83343dcb7a..7805c1c9d9 100755 --- a/bacula/src/stored/parse_bsr.c +++ b/bacula/src/stored/parse_bsr.c @@ -713,9 +713,12 @@ void dump_bsr(BSR *bsr, bool recurse) } if (bsr->count) { Dmsg1(-1, "count : %u\n", bsr->count); + Dmsg1(-1, "found : %u\n", bsr->found); } + Dmsg1(-1, "done : %s\n", bsr->done?"yes":"no"); Dmsg1(-1, "positioning : %d\n", bsr->use_positioning); + Dmsg1(-1, "fast_reject : %d\n", bsr->use_fast_rejection); if (recurse && bsr->next) { Dmsg0(-1, "\n"); dump_bsr(bsr->next, true); diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 7a8b3c26a4..6b9a177d87 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -158,7 +158,7 @@ int read_records(JCR *jcr, DEVICE *dev, Dmsg1(100, "Block empty %d\n", is_block_empty(rec)); for (rec->state=0; !is_block_empty(rec); ) { if (!read_record_from_block(block, rec)) { - Dmsg3(00, "!read-break. state=%s blk=%d rem=%d\n", rec_state_to_str(rec), + Dmsg3(100, "!read-break. state=%s blk=%d rem=%d\n", rec_state_to_str(rec), block->BlockNumber, rec->remainder); break; }