New helper: deactivate_locked_super()
[safe/jmp/linux-2.6] / include / linux / jbd.h
index 35d4f63..c2049a0 100644 (file)
@@ -35,7 +35,7 @@
 #define journal_oom_retry 1
 
 /*
- * Define JBD_PARANIOD_IOFAIL to cause a kernel BUG() if ext3 finds
+ * Define JBD_PARANOID_IOFAIL to cause a kernel BUG() if ext3 finds
  * certain classes of error which can occur due to failed IOs.  Under
  * normal use we want ext3 to continue after such errors, because
  * hardware _can_ fail, but for debugging purposes when running tests on
@@ -543,10 +543,20 @@ struct transaction_s
        unsigned long           t_expires;
 
        /*
+        * When this transaction started, in nanoseconds [no locking]
+        */
+       ktime_t                 t_start_time;
+
+       /*
         * How many handles used this transaction? [t_handle_lock]
         */
        int t_handle_count;
 
+       /*
+        * This transaction is being forced and some process is
+        * waiting for it to finish.
+        */
+       int t_synchronous_commit:1;
 };
 
 /**
@@ -609,6 +619,8 @@ struct transaction_s
  * @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_average_commit_time: the average amount of time in nanoseconds it
+ *     takes to commit a transaction to the disk.
  * @j_private: An opaque pointer to fs-private information.
  */
 
@@ -798,9 +810,19 @@ struct journal_s
        struct buffer_head      **j_wbuf;
        int                     j_wbufsize;
 
+       /*
+        * this is the pid of the last person to run a synchronous operation
+        * through the journal.
+        */
        pid_t                   j_last_sync_writer;
 
        /*
+        * the average amount of time in nanoseconds it takes to commit a
+        * transaction to the disk.  [j_state_lock]
+        */
+       u64                     j_average_commit_time;
+
+       /*
         * An opaque pointer to fs-private information.  ext3 puts its
         * superblock pointer here
         */
@@ -911,7 +933,7 @@ extern int     journal_set_features
                   (journal_t *, unsigned long, unsigned long, unsigned long);
 extern int        journal_create     (journal_t *);
 extern int        journal_load       (journal_t *journal);
-extern void       journal_destroy    (journal_t *);
+extern int        journal_destroy    (journal_t *);
 extern int        journal_recover    (journal_t *journal);
 extern int        journal_wipe       (journal_t *, int);
 extern int        journal_skip_recovery        (journal_t *);
@@ -956,7 +978,8 @@ extern void    journal_destroy_revoke(journal_t *);
 extern int        journal_revoke (handle_t *,
                                unsigned long, struct buffer_head *);
 extern int        journal_cancel_revoke(handle_t *, struct journal_head *);
-extern void       journal_write_revoke_records(journal_t *, transaction_t *);
+extern void       journal_write_revoke_records(journal_t *,
+                                               transaction_t *, int);
 
 /* Recovery revoke support */
 extern int     journal_set_revoke(journal_t *, unsigned long, tid_t);