]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/jbd.h
[PATCH] drivers/mtd/: small cleanups
[linux-2.6-omap-h63xx.git] / include / linux / jbd.h
index 558cb4c26ec9ee6c1d6f8daab784f8bc497fba84..6a425e370cb3db18d15983da16fa0ae87160c283 100644 (file)
 #define jfs_debug jbd_debug
 #else
 
+#include <linux/types.h>
 #include <linux/buffer_head.h>
 #include <linux/journal-head.h>
 #include <linux/stddef.h>
 #include <linux/bit_spinlock.h>
+#include <linux/mutex.h>
+#include <linux/timer.h>
+
 #include <asm/semaphore.h>
 #endif
 
@@ -238,7 +242,6 @@ typedef struct journal_superblock_s
 
 #include <linux/fs.h>
 #include <linux/sched.h>
-#include <asm/bug.h>
 
 #define JBD_ASSERTIONS
 #ifdef JBD_ASSERTIONS
@@ -497,12 +500,6 @@ struct transaction_s
         */
        struct journal_head     *t_checkpoint_list;
 
-       /*
-        * Doubly-linked circular list of all buffers submitted for IO while
-        * checkpointing. [j_list_lock]
-        */
-       struct journal_head     *t_checkpoint_io_list;
-
        /*
         * Doubly-linked circular list of temporary buffers currently undergoing
         * IO in the log [j_list_lock]
@@ -581,7 +578,7 @@ struct transaction_s
  * @j_wait_checkpoint:  Wait queue to trigger checkpointing
  * @j_wait_commit: Wait queue to trigger commit
  * @j_wait_updates: Wait queue to wait for updates to complete
- * @j_checkpoint_sem: Semaphore for locking against concurrent checkpoints
+ * @j_checkpoint_mutex: Mutex for locking against concurrent checkpoints
  * @j_head: Journal head - identifies the first unused block in the journal
  * @j_tail: Journal tail - identifies the oldest still-used block in the
  *  journal.
@@ -618,6 +615,7 @@ struct transaction_s
  * @j_wbuf: array of buffer_heads for journal_commit_transaction
  * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the
  *     number that will fit in j_blocksize
+ * @j_last_sync_writer: most recent pid which did a synchronous write
  * @j_private: An opaque pointer to fs-private information.
  */
 
@@ -650,7 +648,7 @@ struct journal_s
        int                     j_barrier_count;
 
        /* The barrier lock itself */
-       struct semaphore        j_barrier;
+       struct mutex            j_barrier;
 
        /*
         * Transactions: The current running transaction...
@@ -692,7 +690,7 @@ struct journal_s
        wait_queue_head_t       j_wait_updates;
 
        /* Semaphore for locking against concurrent checkpoints */
-       struct semaphore        j_checkpoint_sem;
+       struct mutex            j_checkpoint_mutex;
 
        /*
         * Journal head: identifies the first unused block in the journal.
@@ -791,7 +789,7 @@ struct journal_s
        unsigned long           j_commit_interval;
 
        /* The timer used to wakeup the commit thread: */
-       struct timer_list       *j_commit_timer;
+       struct timer_list       j_commit_timer;
 
        /*
         * The revoke table: maintains the list of revoked blocks in the
@@ -807,6 +805,8 @@ struct journal_s
        struct buffer_head      **j_wbuf;
        int                     j_wbufsize;
 
+       pid_t                   j_last_sync_writer;
+
        /*
         * An opaque pointer to fs-private information.  ext3 puts its
         * superblock pointer here
@@ -849,7 +849,7 @@ extern void journal_commit_transaction(journal_t *);
 
 /* Checkpoint list management */
 int __journal_clean_checkpoint_list(journal_t *journal);
-int __journal_remove_checkpoint(struct journal_head *);
+void __journal_remove_checkpoint(struct journal_head *);
 void __journal_insert_checkpoint(struct journal_head *, transaction_t *);
 
 /* Buffer IO */
@@ -895,7 +895,7 @@ extern int   journal_dirty_metadata (handle_t *, struct buffer_head *);
 extern void     journal_release_buffer (handle_t *, struct buffer_head *);
 extern int      journal_forget (handle_t *, struct buffer_head *);
 extern void     journal_sync_buffer (struct buffer_head *);
-extern int      journal_invalidatepage(journal_t *,
+extern void     journal_invalidatepage(journal_t *,
                                struct page *, unsigned long);
 extern int      journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
 extern int      journal_stop(handle_t *);