Skip to content

Commit

Permalink
jcr: beautyfied comments
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Jul 10, 2018
1 parent 41c993b commit 3d5691d
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions core/src/include/jcr.h
Expand Up @@ -188,23 +188,23 @@ struct CryptoContext {

#ifdef DIRECTOR_DAEMON
struct Resources {
JobResource *job; /**< Job resource */
JobResource *verify_job; /**< Job resource of verify previous job */
JobResource *previous_job; /**< Job resource of migration previous job */
StorageResource *rstore; /**< Selected read storage */
StorageResource *wstore; /**< Selected write storage */
StorageResource *pstore; /**< Selected paired storage (saved wstore or rstore) */
ClientResource *client; /**< Client resource */
PoolResource *pool; /**< Pool resource = write for migration */
PoolResource *rpool; /**< Read pool. Used only in migration */
PoolResource *full_pool; /**< Full backup pool resource */
PoolResource *vfull_pool; /**< Virtual Full backup pool resource */
PoolResource *inc_pool; /**< Incremental backup pool resource */
PoolResource *diff_pool; /**< Differential backup pool resource */
PoolResource *next_pool; /**< Next Pool used for migration/copy and virtual backup */
FilesetResource *fileset; /**< FileSet resource */
CatalogResource *catalog; /**< Catalog resource */
MessagesResource *messages; /**< Default message handler */
JobResource *job; /**< Job resource */
JobResource *verify_job; /**< Job resource of verify previous job */
JobResource *previous_job; /**< Job resource of migration previous job */
StorageResource *rstore; /**< Selected read storage */
StorageResource *wstore; /**< Selected write storage */
StorageResource *pstore; /**< Selected paired storage (saved wstore or rstore) */
ClientResource *client; /**< Client resource */
PoolResource *pool; /**< Pool resource = write for migration */
PoolResource *rpool; /**< Read pool. Used only in migration */
PoolResource *full_pool; /**< Full backup pool resource */
PoolResource *vfull_pool; /**< Virtual Full backup pool resource */
PoolResource *inc_pool; /**< Incremental backup pool resource */
PoolResource *diff_pool; /**< Differential backup pool resource */
PoolResource *next_pool; /**< Next Pool used for migration/copy and virtual backup */
FilesetResource *fileset; /**< FileSet resource */
CatalogResource *catalog; /**< Catalog resource */
MessagesResource *messages; /**< Default message handler */
POOLMEM *pool_source; /**< Where pool came from */
POOLMEM *npool_source; /**< Where next pool came from */
POOLMEM *rpool_source; /**< Where migrate read pool came from */
Expand Down Expand Up @@ -255,9 +255,9 @@ class DLL_IMP_EXP JobControlRecord {
private:
pthread_mutex_t mutex; /**< Jcr mutex */
volatile int32_t _use_count; /**< Use count */
int32_t JobType_; /**< Backup, restore, verify ... */
int32_t JobLevel_; /**< Job level */
int32_t Protocol_; /**< Backup Protocol */
int32_t JobType_; /**< Backup, restore, verify ... */
int32_t JobLevel_; /**< Job level */
int32_t Protocol_; /**< Backup Protocol */
bool my_thread_killable; /**< Can we kill the thread? */
public:
JobControlRecord() {
Expand Down Expand Up @@ -312,8 +312,8 @@ class DLL_IMP_EXP JobControlRecord {
bool sendJobStatus(); /**< in lib/jcr.c */
bool sendJobStatus(int newJobStatus); /**< in lib/jcr.c */
bool JobReads(); /**< in lib/jcr.c */
void MyThreadSendSignal(int sig); /**< in lib/jcr.c */
void SetKillable(bool killable); /**< in lib/jcr.c */
void MyThreadSendSignal(int sig); /**< in lib/jcr.c */
void SetKillable(bool killable); /**< in lib/jcr.c */
bool IsKillable() const { return my_thread_killable; }

#ifdef DIRECTOR_DAEMON
Expand Down Expand Up @@ -341,9 +341,9 @@ class DLL_IMP_EXP JobControlRecord {
*/
dlink link; /**< JobControlRecord chain link */
pthread_t my_thread_id; /**< Id of thread controlling jcr */
BareosSocket *dir_bsock; /**< Director bsock or NULL if we are him */
BareosSocket *store_bsock; /**< Storage connection socket */
BareosSocket *file_bsock; /**< File daemon connection socket */
BareosSocket *dir_bsock; /**< Director bsock or NULL if we are him */
BareosSocket *store_bsock; /**< Storage connection socket */
BareosSocket *file_bsock; /**< File daemon connection socket */
JCR_free_HANDLER *daemon_free_jcr; /**< Local free routine */
dlist *msg_queue; /**< Queued messages */
pthread_mutex_t msg_queue_mutex; /**< message queue mutex */
Expand Down Expand Up @@ -410,17 +410,17 @@ class DLL_IMP_EXP JobControlRecord {
*/

int32_t buf_size; /**< Length of buffer */
CompressionContext compress; /**< Compression ctx */
CompressionContext compress; /**< Compression ctx */
#ifdef HAVE_WIN32
CopyThreadContext *cp_thread; /**< Copy Thread ctx */
CopyThreadContext *cp_thread; /**< Copy Thread ctx */
#endif
POOLMEM *attr; /**< Attribute string from SD */
BareosDb *db; /**< database pointer */
BareosDb *db_batch; /**< database pointer for batch and accurate */
BareosDb *db; /**< database pointer */
BareosDb *db_batch; /**< database pointer for batch and accurate */
uint64_t nb_base_files; /**< Number of base files */
uint64_t nb_base_files_used; /**< Number of useful files in base */

AttributesDbRecord *ar; /**< DB attribute record */
AttributesDbRecord *ar; /**< DB attribute record */
guid_list *id_list; /**< User/group id to name list */

alist *plugin_ctx_list; /**< List of contexts for plugins */
Expand All @@ -445,10 +445,10 @@ class DLL_IMP_EXP JobControlRecord {
pthread_cond_t term_wait; /**< Wait for job termination */
pthread_cond_t nextrun_ready; /**< Wait for job next run to become ready */
workq_ele_t *work_item; /**< Work queue item if scheduled */
BareosSocket *ua; /**< User agent */
BareosSocket *ua; /**< User agent */
Resources res; /**< Resources assigned */
TREE_ROOT *restore_tree_root; /**< Selected files to restore (some protocols need this info) */
BootStrapRecord *bsr; /**< Bootstrap record -- has everything */
BootStrapRecord *bsr; /**< Bootstrap record -- has everything */
char *backup_format; /**< Backup format used when doing a NDMP backup */
char *plugin_options; /**< User set options for plugin */
uint32_t SDJobFiles; /**< Number of files written, this job */
Expand All @@ -461,9 +461,9 @@ class DLL_IMP_EXP JobControlRecord {
uint32_t MediaId; /**< DB record IDs associated with this job */
uint32_t FileIndex; /**< Last FileIndex processed */
utime_t MaxRunSchedTime; /**< Max run time in seconds from Initial Scheduled time */
JobDbRecord jr; /**< Job DB record for current job */
JobDbRecord previous_jr; /**< Previous job database record */
JobControlRecord *mig_jcr; /**< JobControlRecord for migration/copy job */
JobDbRecord jr; /**< Job DB record for current job */
JobDbRecord previous_jr; /**< Previous job database record */
JobControlRecord *mig_jcr; /**< JobControlRecord for migration/copy job */
char FSCreateTime[MAX_TIME_LENGTH]; /**< FileSet CreateTime as returned from DB */
char since[MAX_TIME_LENGTH]; /**< Since time */
char PrevJob[MAX_NAME_LENGTH]; /**< Previous job name assiciated with since time */
Expand Down Expand Up @@ -522,10 +522,10 @@ class DLL_IMP_EXP JobControlRecord {
bool incremental; /**< Set if incremental for SINCE */
utime_t mtime; /**< Begin time for SINCE */
int listing; /**< Job listing in estimate */
int32_t Ticket; /**< Ticket */
int32_t Ticket; /**< Ticket */
char *big_buf; /**< I/O buffer */
int32_t replace; /**< Replace options */
FindFilesPacket *ff; /**< Find Files packet */
FindFilesPacket *ff; /**< Find Files packet */
char PrevJob[MAX_NAME_LENGTH]; /**< Previous job name assiciated with since time */
uint32_t ExpectedFiles; /**< Expected restore files */
uint32_t StartFile;
Expand All @@ -537,8 +537,8 @@ class DLL_IMP_EXP JobControlRecord {
std::shared_ptr<BareosSocket> hb_bsock; /**< Duped SD socket */
std::shared_ptr<BareosSocket> hb_dir_bsock; /**< Duped DIR socket */
alist *RunScripts; /**< Commands to run before and after job */
CryptoContext crypto; /**< Crypto ctx */
DirectorResource *director; /**< Director resource */
CryptoContext crypto; /**< Crypto ctx */
DirectorResource *director; /**< Director resource */
bool enable_vss; /**< VSS used by FD */
bool got_metadata; /**< Set when found job_metadata */
bool multi_restore; /**< Dir can do multiple storage restore */
Expand All @@ -553,34 +553,34 @@ class DLL_IMP_EXP JobControlRecord {
/*
* Storage Daemon specific part of JobControlRecord
*/
JobControlRecord *next_dev; /**< Next JobControlRecord attached to device */
JobControlRecord *prev_dev; /**< Previous JobControlRecord attached to device */
JobControlRecord *next_dev; /**< Next JobControlRecord attached to device */
JobControlRecord *prev_dev; /**< Previous JobControlRecord attached to device */
char *dir_auth_key; /**< Dir auth key */
pthread_cond_t job_start_wait; /**< Wait for FD to start Job */
pthread_cond_t job_end_wait; /**< Wait for Job to end */
int32_t type;
DeviceControlRecord *read_dcr; /**< Device context for reading */
DeviceControlRecord *dcr; /**< Device context record */
DeviceControlRecord *read_dcr; /**< Device context for reading */
DeviceControlRecord *dcr; /**< Device context record */
alist *dcrs; /**< List of dcrs open */
POOLMEM *job_name; /**< Base Job name (not unique) */
POOLMEM *fileset_name; /**< FileSet */
POOLMEM *fileset_md5; /**< MD5 for FileSet */
POOLMEM *backup_format; /**< Backup format used when doing a NDMP backup */
VolumeList *VolList; /**< List to read */
VolumeList *VolList; /**< List to read */
int32_t NumWriteVolumes; /**< Number of volumes written */
int32_t NumReadVolumes; /**< Total number of volumes to read */
int32_t CurReadVolume; /**< Current read volume number */
int32_t label_errors; /**< Count of label errors */
bool session_opened;
bool remote_replicate; /**< Replicate data to remote SD */
int32_t Ticket; /**< Ticket for this job */
int32_t Ticket; /**< Ticket for this job */
bool ignore_label_errors; /**< Ignore Volume label errors */
bool spool_attributes; /**< Set if spooling attributes */
bool no_attributes; /**< Set if no attributes wanted */
int64_t spool_size; /**< Spool size for this job */
bool spool_data; /**< Set to spool data */
int32_t CurVol; /**< Current Volume count */
DirectorResource *director; /**< Director resource */
DirectorResource *director; /**< Director resource */
alist *plugin_options; /**< Specific Plugin Options sent by DIR */
alist *write_store; /**< List of write storage devices sent by DIR */
alist *read_store; /**< List of read devices sent by DIR */
Expand All @@ -595,7 +595,7 @@ class DLL_IMP_EXP JobControlRecord {
* Parameters for Open Read Session
*/
READ_CTX *rctx; /**< Read context used to keep track of what is processed or not */
BootStrapRecord *bsr; /**< Bootstrap record -- has everything */
BootStrapRecord *bsr; /**< Bootstrap record -- has everything */
bool mount_next_volume; /**< Set to cause next volume mount */
uint32_t read_VolSessionId;
uint32_t read_VolSessionTime;
Expand Down

0 comments on commit 3d5691d

Please sign in to comment.