From 6b75244c955e085f76a6cd5eb56091d48b887ec2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 24 Nov 2008 08:00:44 +0000 Subject: [PATCH] Move definition of FileId_t to bc_types and define it once in the jcr git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8079 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/bc_types.h | 14 ++++++++++++++ bacula/src/cats/cats.h | 13 ------------- bacula/src/jcr.h | 4 +--- bacula/technotes-2.5 | 2 ++ 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/bacula/src/bc_types.h b/bacula/src/bc_types.h index b5cda8557c..00254b2e7c 100644 --- a/bacula/src/bc_types.h +++ b/bacula/src/bc_types.h @@ -48,6 +48,20 @@ #ifndef __bc_types_INCLUDED #define __bc_types_INCLUDED +/* + * These are the sizes of the current definitions of database + * Ids. In general, FileId_t can be set to uint64_t and it + * *should* work. Users have reported back that it does work + * for PostgreSQL. For the other types, all places in Bacula + * have been converted, but no one has actually tested it. + * In principle, the only field that really should need to be + * 64 bits is the FileId_t + */ +typedef uint32_t FileId_t; +typedef uint32_t DBId_t; /* general DB id type */ +typedef uint32_t JobId_t; + + typedef char POOLMEM; diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index 3c761d7c9d..2d3b624264 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -740,19 +740,6 @@ struct B_DB { extern uint32_t bacula_db_version; -/* - * These are the sizes of the current definitions of database - * Ids. In general, FileId_t can be set to uint64_t and it - * *should* work. Users have reported back that it does work - * for PostgreSQL. For the other types, all places in Bacula - * have been converted, but no one has actually tested it. - * In principle, the only field that really should need to be - * 64 bits is the FileId_t - */ -typedef uint32_t FileId_t; -typedef uint32_t DBId_t; /* general DB id type */ -typedef uint32_t JobId_t; - #define faddr_t long /* diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 8eb784ca36..d7dfff922f 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -211,6 +211,7 @@ public: uint32_t JobErrors; /* */ uint64_t JobBytes; /* Number of bytes processed this job */ uint64_t ReadBytes; /* Bytes read -- before compression */ + FileId_t FileId; /* Last FileId used */ uint32_t Errors; /* Number of non-fatal errors */ volatile int32_t JobStatus; /* ready, running, blocked, terminated */ int32_t JobPriority; /* Job priority */ @@ -289,7 +290,6 @@ public: volatile int32_t FDJobStatus; /* File daemon Job Status */ uint32_t ExpectedFiles; /* Expected restore files */ uint32_t MediaId; /* DB record IDs associated with this job */ - FileId_t FileId; /* Last file id inserted */ uint32_t FileIndex; /* Last FileIndex processed */ POOLMEM *fname; /* name to put into catalog */ JOB_DBR jr; /* Job DB record for current job */ @@ -394,8 +394,6 @@ public: bool write_part_after_job; /* Set to write part after job */ bool PreferMountedVols; /* Prefer mounted vols rather than new */ bool need_fd; /* set if we need FD connection */ - - uint32_t FileId; /* Last file id inserted */ /* Parmaters for Open Read Session */ BSR *bsr; /* Bootstrap record -- has everything */ diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 41f21be48a..2c00e81093 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -10,6 +10,8 @@ filepattern (restore with regex in bsr) mixed priorities General: +24Nov08 +kes Move definition of FileId_t to bc_types and define it once in the jcr. 22Nov08 kes Remove all time_t from arguments in favor of utime_t, which is machine independent. -- 2.39.5