/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
This program is Free Software; you can redistribute it and/or
- modify it under the terms of version two of the GNU General Public
+ modify it under the terms of version three of the GNU Affero General Public
License as published by the Free Software Foundation and included
in the file LICENSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
/*
* Protypes for stored -- Kern Sibbald MM
*
- * Version $Id$
*/
/* From stored.c */
DCR *new_dcr(JCR *jcr, DCR *dcr, DEVICE *dev);
void free_dcr(DCR *dcr);
+/* From append.c */
+bool send_attrs_to_dir(JCR *jcr, DEV_RECORD *rec);
+
/* From askdir.c */
enum get_vol_info_rw {
GET_VOL_INFO_FOR_WRITE,
/* From reserve.c */
void init_reservations_lock();
void term_reservations_lock();
-void _lock_reservations();
+void _lock_reservations(const char *file="**Unknown**", int line=0);
void _unlock_reservations();
-void _lock_volumes();
+void _lock_volumes(const char *file="**Unknown**", int line=0);
void _unlock_volumes();
void unreserve_device(DCR *dcr);
void send_drive_reserve_messages(JCR *jcr, void sendit(const char *msg, int len, void *sarg), void *arg);
do { Dmsg3(sd_dbglvl, "lock_reservations at %s:%d precnt=%d\n", \
__FILE__, __LINE__, \
reservations_lock_count); \
- _lock_reservations(); \
+ _lock_reservations(__FILE__, __LINE__); \
Dmsg0(sd_dbglvl, "lock_reservations: got lock\n"); \
} while (0)
#define unlock_reservations() \
do { Dmsg3(sd_dbglvl, "lock_volumes at %s:%d precnt=%d\n", \
__FILE__, __LINE__, \
vol_list_lock_count); \
- _lock_volumes(); \
+ _lock_volumes(__FILE__, __LINE__); \
Dmsg0(sd_dbglvl, "lock_volumes: got lock\n"); \
} while (0)
#else
-#define lock_reservations() _lock_reservations()
+#define lock_reservations() _lock_reservations(__FILE__, __LINE__)
#define unlock_reservations() _unlock_reservations()
-#define lock_volumes() _lock_volumes()
+#define lock_volumes() _lock_volumes(__FILE__, __LINE__)
#define unlock_volumes() _unlock_volumes()
#endif
void free_volume_lists();
void list_volumes(void sendit(const char *msg, int len, void *sarg), void *arg);
bool is_volume_in_use(DCR *dcr);
-void debug_list_volumes(const char *imsg);
extern int vol_list_lock_count;
void add_read_volume(JCR *jcr, const char *VolumeName);
void remove_read_volume(JCR *jcr, const char *VolumeName);