]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
Make SD lock tracing work again. Has not worked for some time.
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from
7    many others, a complete list can be found in the file AUTHORS.
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version two of the GNU General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23    Bacula® is a registered trademark of Kern Sibbald.
24    The licensor of Bacula is the Free Software Foundation Europe
25    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26    Switzerland, email:ftf@fsfeurope.org.
27 */
28 /*
29  * Storage daemon specific defines and includes
30  *
31  *  Version $Id$
32  */
33
34 #ifndef __STORED_H_
35 #define __STORED_H_
36
37 #define STORAGE_DAEMON 1
38
39 /* Set to debug mutexes */
40 //#define SD_DEBUG_LOCK
41 #ifdef SD_DEBUG_LOCK
42 const int sd_dbglvl = 3;
43 #else
44 const int sd_dbglvl = 300;
45 #endif
46
47 #ifdef HAVE_MTIO_H
48 #include <mtio.h>
49 #else
50 # ifdef HAVE_SYS_MTIO_H
51 # include <sys/mtio.h>
52 # else
53 #   ifdef HAVE_SYS_TAPE_H
54 #   include <sys/tape.h>
55 #   endif
56 # endif
57 #endif
58 #include "lock.h"
59 #include "block.h"
60 #include "record.h"
61 #include "dev.h"
62 #include "stored_conf.h"
63 #include "bsr.h"
64 #include "jcr.h"
65 #include "reserve.h"
66 #include "protos.h"
67 #ifdef HAVE_LIBZ
68 #include <zlib.h>                     /* compression headers */
69 #else
70 #define uLongf uint32_t
71 #endif
72 #ifdef HAVE_FNMATCH
73 #include <fnmatch.h>
74 #else
75 #include "lib/fnmatch.h"
76 #endif
77 #ifdef HAVE_DIRENT_H
78 #include <dirent.h>
79 #define NAMELEN(dirent) (strlen((dirent)->d_name))
80 #endif
81 #ifndef HAVE_READDIR_R
82 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
83 #endif
84
85 #include "vtape.h"
86
87 /* Daemon globals from stored.c */
88 extern STORES *me;                    /* "Global" daemon resource */
89 extern bool forge_on;                 /* proceed inspite of I/O errors */
90 extern pthread_mutex_t device_release_mutex;
91 extern pthread_cond_t wait_device_release; /* wait for any device to be released */                           
92
93 #endif /* __STORED_H_ */