]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dev.h
Fix bscan walk DCRs + add some bools to dev.c
[bacula/bacula] / bacula / src / stored / dev.h
index 580c3f6aa02d188ffdb8b13b026a1d716a4169c2..4efe4bd7d40948b700cceebd5c00e655d9a77e1e 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef __DEV_H
 #define __DEV_H 1
 
+#undef DCR                            /* used by Bacula */
+
 /* #define NEW_LOCK 1 */
 
 #define new_lock_device(dev)             _new_lock_device(__FILE__, __LINE__, (dev)) 
@@ -170,6 +172,10 @@ public:
    int dev_prev_blocked;              /* previous blocked state */
    int num_waiting;                   /* number of threads waiting */
    int num_writers;                   /* number of writing threads */
+
+   /* New access control in process of being implemented */
+   brwlock_t lock;                    /* New mutual exclusion lock */
+
    int use_count;                     /* usage count on this device */
    int fd;                            /* file descriptor */
    int capabilities;                  /* capabilities mask */
@@ -224,11 +230,11 @@ struct DCR {
    JCR *jcr;                          /* pointer to JCR */
    DEVICE *dev;                       /* pointer to device */
    DEV_BLOCK *block;                  /* pointer to block */
-   DEV_RECORD *record;                /* pointer to record */
+   DEV_RECORD *rec;                   /* pointer to record */
+   int spool_fd;                      /* fd if spooling */
    bool spool_data;                   /* set to spool data */
    bool spooling;                     /* set when actually spooling */
    bool dev_locked;                   /* set if dev already locked */
-   int spool_fd;                      /* fd if spooling */
    bool NewVol;                       /* set if new Volume mounted */
    bool WroteVol;                     /* set if Volume written */
    bool NewFile;                      /* set when EOF written */
@@ -239,8 +245,8 @@ struct DCR {
    uint32_t StartFile;                /* Start write file */
    uint32_t StartBlock;               /* Start write block */
    uint32_t EndBlock;                 /* Ending block written */
-   uint64_t spool_size;               /* Current spool size */
-   uint64_t max_spool_size;           /* Max job spool size */
+   int64_t spool_size;                /* Current spool size */
+   int64_t max_spool_size;            /* Max job spool size */
    char VolumeName[MAX_NAME_LENGTH];  /* Volume name */
    VOLUME_CAT_INFO VolCatInfo;        /* Catalog info for desired volume */
 };