]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.h
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / src / stored / block.h
index 68274579352dd08578ba27978c10c8be441be9d2..d230fedf7a86705e0fab2cb1bcac00e5d965e21b 100644 (file)
@@ -7,7 +7,7 @@
  *
  */
 /*
-   Copyright (C) 2000-2003 Kern Sibbald and John Walker
+   Copyright (C) 2000-2004 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -63,7 +63,7 @@
  *  Note, when written, it is serialized.
 
    uint32_t CheckSum;
-   uint32_t block_len; 
+   uint32_t block_len;
    uint32_t BlockNumber;
    char     Id[BLKHDR_ID_LENGTH];
 
@@ -73,6 +73,8 @@
    uint32_t VolSessionTime;
  */
 
+class DEVICE;                         /* for forward reference */
+
 /*
  * DEV_BLOCK for reading and writing blocks.
  * This is the basic unit that is written to the device, and
@@ -84,7 +86,7 @@
  */
 struct DEV_BLOCK {
    DEV_BLOCK *next;                   /* pointer to next one */
-   void *dev;                         /* pointer to device (DEVICE not defined yet) */
+   DEVICE *dev;                       /* pointer to device */
    /* binbuf is the number of bytes remaining in the buffer.
     *   For writes, it is bytes not yet written.
     *   For reads, it is remaining bytes not yet read.
@@ -96,10 +98,10 @@ struct DEV_BLOCK {
    uint32_t read_len;                 /* bytes read into buffer, if zero, block empty */
    uint32_t VolSessionId;             /* */
    uint32_t VolSessionTime;           /* */
+   uint32_t read_errors;              /* block errors (checksum, header, ...) */
    int      BlockVer;                 /* block version 1 or 2 */
    bool     write_failed;             /* set if write failed */
    bool     block_read;               /* set when block read */
-   int      checksum_errors;          /* count of block checksum errors */
    int32_t  FirstIndex;               /* first index this block */
    int32_t  LastIndex;                /* last index this block */
    char    *bufp;                     /* pointer into buffer */