summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext2fs/ext2fs.c3
-rw-r--r--ext2fs/ext2fs.h4
-rw-r--r--libtreefs/xinl.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c
index 1ead6d2f..4f38c927 100644
--- a/ext2fs/ext2fs.c
+++ b/ext2fs/ext2fs.c
@@ -55,6 +55,9 @@ struct store *store;
struct store_parsed *store_parsed;
char *diskfs_disk_name;
+
+pthread_spinlock_t global_lock = PTHREAD_SPINLOCK_INITIALIZER;
+pthread_spinlock_t modified_global_blocks_lock = PTHREAD_SPINLOCK_INITIALIZER;
#ifdef EXT2FS_DEBUG
int ext2_debug_flag;
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index afcd25c8..a3d22b28 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -433,7 +433,7 @@ void write_all_disknodes ();
/* What to lock if changing global data data (e.g., the superblock or block
group descriptors or bitmaps). */
-pthread_spinlock_t global_lock;
+extern pthread_spinlock_t global_lock;
/* Where to record such changes. */
struct pokel global_pokel;
@@ -442,7 +442,7 @@ struct pokel global_pokel;
record which disk blocks are actually modified, so we don't stomp on parts
of the disk which are backed by file pagers. */
unsigned char *modified_global_blocks;
-pthread_spinlock_t modified_global_blocks_lock;
+extern pthread_spinlock_t modified_global_blocks_lock;
extern int global_block_modified (block_t block);
extern void record_global_poke (void *ptr);
diff --git a/libtreefs/xinl.c b/libtreefs/xinl.c
index fe83e5a3..ca7073a4 100644
--- a/libtreefs/xinl.c
+++ b/libtreefs/xinl.c
@@ -1,3 +1,5 @@
#define TREEFS_DEFINE_EI
#include "treefs.h"
#include "mig-decls.h"
+
+pthread_spinlock_t treefs_node_refcnt_lock = PTHREAD_SPINLOCK_INITIALIZER;