summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2000-12-31 02:55:11 +0000
committerTheodore Ts'o <tytso@mit.edu>2000-12-31 02:55:11 +0000
commitf13a987afa5b7d12c8da69d1a1c282b0dfc0b5f4 (patch)
tree85196fd7fe5fcd71ba7c777562315230d15112f8 /include
parentc59a704b79cbb9e35050d4555b149b780149069d (diff)
downloade2fsprogs-f13a987afa5b7d12c8da69d1a1c282b0dfc0b5f4.tar.gz
ChangeLog, jfs.h:
jfs.h: Update to 0.5e version
Diffstat (limited to 'include')
-rw-r--r--include/linux/ChangeLog4
-rw-r--r--include/linux/jfs.h41
2 files changed, 36 insertions, 9 deletions
diff --git a/include/linux/ChangeLog b/include/linux/ChangeLog
index 7e97ce0c..803993ee 100644
--- a/include/linux/ChangeLog
+++ b/include/linux/ChangeLog
@@ -1,3 +1,7 @@
+2000-12-30 <tytso@snap.thunk.org>
+
+ * jfs.h: Update to 0.5e version
+
2000-12-09 <tytso@snap.thunk.org>
* jfs.h, jfs_compat.h, list.h: New files added to support ext3.
diff --git a/include/linux/jfs.h b/include/linux/jfs.h
index 3053449e..48437717 100644
--- a/include/linux/jfs.h
+++ b/include/linux/jfs.h
@@ -26,6 +26,8 @@
*/
#ifdef __KERNEL__
#define JFS_DEBUG
+#else
+#define JFS_DEBUG
#endif
extern int journal_enable_debug;
@@ -36,7 +38,7 @@ extern int journal_enable_debug;
if ((n) <= journal_enable_debug) { \
printk (KERN_DEBUG "JFS DEBUG: (%s, %d): %s: ", \
__FILE__, __LINE__, __FUNCTION__); \
- printk (f, a); \
+ printk (f, ## a); \
} \
} while (0)
#else
@@ -302,9 +304,6 @@ struct transaction_s
* transaction handle but not yet modified. */
int t_outstanding_credits;
- /* Wait queue to wait for updates to complete */
- struct wait_queue * t_wait;
-
/* Forward and backward links for the circular list of all
* transactions awaiting checkpoint */
transaction_t *t_cpnext, *t_cpprev;
@@ -337,6 +336,12 @@ struct journal_s
/* Version of the superblock format */
int j_format_version;
+
+ /* Number of processes waiting to create a barrier lock */
+ int j_barrier_count;
+
+ /* The barrier lock itself */
+ struct semaphore j_barrier;
/* Transactions: The current running transaction... */
transaction_t * j_running_transaction;
@@ -352,7 +357,7 @@ struct journal_s
struct wait_queue * j_wait_lock;
/* Wait queue for waiting for a locked transaction to start
- committing */
+ committing, or for a barrier lock to be released */
struct wait_queue * j_wait_transaction_locked;
/* Wait queue for waiting for checkpointing to complete */
@@ -367,6 +372,9 @@ struct journal_s
/* Wait queue to trigger commit */
struct wait_queue * j_wait_commit;
+ /* Wait queue to wait for updates to complete */
+ struct wait_queue * j_wait_updates;
+
/* Semaphore for locking against concurrent checkpoints */
struct semaphore j_checkpoint_sem;
@@ -442,10 +450,12 @@ struct journal_s
/*
* Journal flag definitions
*/
-#define JFS_UNMOUNT 1 /* Journal thread is being destroyed */
-#define JFS_SYNC 2 /* Perform synchronous transaction commits */
-#define JFS_ABORT 4 /* Journaling has been aborted for errors. */
-#define JFS_ACK_ERR 8 /* The errno in the sb has been acked */
+#define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */
+#define JFS_SYNC 0x002 /* Perform synchronous transaction commits */
+#define JFS_ABORT 0x004 /* Journaling has been aborted for errors. */
+#define JFS_ACK_ERR 0x008 /* The errno in the sb has been acked */
+#define JFS_FLUSHED 0x010 /* The journal superblock has been flushed */
+#define JFS_LOADED 0x020 /* The journal superblock has been loaded */
/*
* Journaling internal variables/parameters
@@ -553,6 +563,9 @@ extern void journal_sync_buffer (struct buffer_head *);
extern int journal_stop (handle_t *);
extern int journal_flush (journal_t *);
+extern void journal_lock_updates (journal_t *);
+extern void journal_unlock_updates (journal_t *);
+
extern journal_t * journal_init_dev (kdev_t, int start, int len, int bsize);
extern journal_t * journal_init_inode (struct inode *);
extern int journal_update_format (journal_t *);
@@ -566,6 +579,8 @@ extern int journal_create (journal_t *);
extern int journal_load (journal_t *);
extern void journal_release (journal_t *);
extern int journal_recover (journal_t *);
+extern int journal_wipe (journal_t *, int);
+extern int journal_skip_recovery (journal_t *);
extern void journal_update_superblock (journal_t *, int);
extern void __journal_abort (journal_t *);
extern void journal_abort (journal_t *, int);
@@ -627,6 +642,14 @@ static inline int is_journal_abort(journal_t *journal)
return journal->j_flags & JFS_ABORT;
}
+/* Not all architectures define BUG() */
+#ifndef BUG
+ #define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ * ((char *) 0) = 0; \
+ } while (0)
+#endif /* BUG */
+
#endif /* __KERNEL__ */
/* Comparison functions for transaction IDs: perform comparisons using