From 4aeebc0be357883facc59cd4fecc8edd9ccfd205 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 8 Jul 2003 21:58:43 +0000 Subject: [PATCH] Remove block number increment in read git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@628 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 15 ++++++++------- bacula/src/stored/block.c | 1 - bacula/src/stored/block.h | 2 +- bacula/src/stored/bls.c | 4 ++-- bacula/src/stored/read.c | 2 +- bacula/src/stored/read_record.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index 67455ffafe..1502c9f495 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -37,6 +37,7 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.31 release: +- Listing of Win32 restored files has ??????? for user. - Do full check the command line args in update (e.g. VolStatus ...). - In Win portable restore the directory is not create 27-Jun-2003 16:52 tibs-fd: kernsrestore.2003-06-27_16.52.20 Error: @@ -62,6 +63,9 @@ For 1.31 release: For 1.32: +- Allow multiple Storage specifications (or multiple names on + a single Storage specification) in the Job record. Thus a job + can be backed up to a number of storage devices. - Add client name to cram-md5 challenge so Director can immediately verify if it is the correct client. - Implement ClientRunBeforeJob and ClientRunAfterJob. @@ -120,10 +124,6 @@ For 1.32: - Add thread specific data to hold the jcr -- send error messages from low level routines by accessing it and using Jmsg(). - Cancel waiting for Client connect in SD if FD goes away. -- Testing Tibs job erred and hung director on Storage resource. This was - because there were a whole pile of jobs hanging around in the SD - waiting for a connection from the FD that was never coming. -- Possibly update all client records at startup. - Add Progress command that periodically reports the progress of a job or all jobs. @@ -158,9 +158,6 @@ For 1.32: disk only when the tape is full, then when a tape is hung move it to tape. - Implement a relocatable bacula.spec -- Allow multiple Storage specifications (or multiple names on - a single Storage specification) in the Job record. Thus a job - can be backed up to a number of storage devices. - Implement dump/print label to UA - Add prefixlinks to where or not where absolute links to FD. - Issue message to mount a new tape before the rewind. @@ -1019,3 +1016,7 @@ Done: (see kernsdone for more) - Pass prefix_links to FD. - Fix restore list of volumes if Volume not selected. - Complete (or turn off) the command line code in update. +- Testing Tibs job erred and hung director on Storage resource. This was + because there were a whole pile of jobs hanging around in the SD + waiting for a connection from the FD that was never coming. +- Possibly update all client records at startup. diff --git a/bacula/src/stored/block.c b/bacula/src/stored/block.c index 9cf920f0c7..3f95c792ae 100644 --- a/bacula/src/stored/block.c +++ b/bacula/src/stored/block.c @@ -651,7 +651,6 @@ reread: dev->EndBlock = dev->block_num; dev->EndFile = dev->file; dev->block_num++; - block->BlockNumber++; /* Update jcr values */ if (dev->state & ST_TAPE) { diff --git a/bacula/src/stored/block.h b/bacula/src/stored/block.h index 2972bded93..e52e075079 100644 --- a/bacula/src/stored/block.h +++ b/bacula/src/stored/block.h @@ -105,6 +105,6 @@ struct DEV_BLOCK { POOLMEM *buf; /* actual data buffer */ }; -#define block_is_empty(block) !((block)->read_len) +#define block_is_empty(block) ((block)->read_len == 0) #endif diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index 77af116b5e..17af6f3231 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -283,8 +283,8 @@ static void do_blocks(char *infname) continue; } Dmsg5(100, "Blk=%u blen=%u bVer=%d SessId=%u SessTim=%u\n", - block->BlockNumber, block->block_len, block->BlockVer, - block->VolSessionId, block->VolSessionTime); + block->BlockNumber, block->block_len, block->BlockVer, + block->VolSessionId, block->VolSessionTime); if (verbose == 1) { read_record_from_block(block, rec); Pmsg7(-1, "Block: %u blen=%u First rec FI=%s SessId=%u SessTim=%u Strm=%s rlen=%d\n", diff --git a/bacula/src/stored/read.c b/bacula/src/stored/read.c index b47362e48a..2777002b19 100644 --- a/bacula/src/stored/read.c +++ b/bacula/src/stored/read.c @@ -142,7 +142,7 @@ int do_read_data(JCR *jcr) } if (!block_is_empty(block) && !match_bsr_block(jcr->bsr, block)) { - Dmsg5(100, "reject Blk=%u blen=%u bVer=%d SessId=%u SessTim=%u\n", + Dmsg5(150, "reject Blk=%u blen=%u bVer=%d SessId=%u SessTim=%u\n", block->BlockNumber, block->block_len, block->BlockVer, block->VolSessionId, block->VolSessionTime); empty_block(block); /* force read next block */ diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 92930f1562..8fd93d5b33 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -112,13 +112,13 @@ int read_records(JCR *jcr, DEVICE *dev, } } if (!match_bsr_block(jcr->bsr, block)) { - Dmsg5(100, "reject Blk=%u blen=%u bVer=%d SessId=%u SessTim=%u\n", + Dmsg5(150, "reject Blk=%u blen=%u bVer=%d SessId=%u SessTim=%u\n", block->BlockNumber, block->block_len, block->BlockVer, block->VolSessionId, block->VolSessionTime); continue; } if (verbose) { - Dmsg4(000, "Block: %d VI=%u VT=%u blen=%d\n", block->BlockNumber, + Pmsg4(000, "Block: %d VI=%u VT=%u blen=%d\n", block->BlockNumber, block->VolSessionId, block->VolSessionTime, block->block_len); } -- 2.39.5