diff options
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index e30b66346942..50e5a5e6a712 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #ifndef __KERNEL__ | 20 | #ifndef __KERNEL__ |
21 | #include "jfs_compat.h" | 21 | #include "jfs_compat.h" |
22 | #define JBD2_DEBUG | 22 | #define JBD2_DEBUG |
23 | #define jfs_debug jbd_debug | ||
24 | #else | 23 | #else |
25 | 24 | ||
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
@@ -57,7 +56,7 @@ | |||
57 | * CONFIG_JBD2_DEBUG is on. | 56 | * CONFIG_JBD2_DEBUG is on. |
58 | */ | 57 | */ |
59 | #define JBD2_EXPENSIVE_CHECKING | 58 | #define JBD2_EXPENSIVE_CHECKING |
60 | extern u8 jbd2_journal_enable_debug; | 59 | extern ushort jbd2_journal_enable_debug; |
61 | 60 | ||
62 | #define jbd_debug(n, f, a...) \ | 61 | #define jbd_debug(n, f, a...) \ |
63 | do { \ | 62 | do { \ |
@@ -397,35 +396,18 @@ struct jbd2_journal_handle | |||
397 | int h_err; | 396 | int h_err; |
398 | 397 | ||
399 | /* Flags [no locking] */ | 398 | /* Flags [no locking] */ |
400 | unsigned int h_sync:1; /* sync-on-close */ | 399 | unsigned int h_sync: 1; /* sync-on-close */ |
401 | unsigned int h_jdata:1; /* force data journaling */ | 400 | unsigned int h_jdata: 1; /* force data journaling */ |
402 | unsigned int h_aborted:1; /* fatal error on handle */ | 401 | unsigned int h_aborted: 1; /* fatal error on handle */ |
403 | unsigned int h_cowing:1; /* COWing block to snapshot */ | 402 | unsigned int h_type: 8; /* for handle statistics */ |
404 | 403 | unsigned int h_line_no: 16; /* for handle statistics */ | |
405 | /* Number of buffers requested by user: | ||
406 | * (before adding the COW credits factor) */ | ||
407 | unsigned int h_base_credits:14; | ||
408 | |||
409 | /* Number of buffers the user is allowed to dirty: | ||
410 | * (counts only buffers dirtied when !h_cowing) */ | ||
411 | unsigned int h_user_credits:14; | ||
412 | 404 | ||
405 | unsigned long h_start_jiffies; | ||
406 | unsigned int h_requested_credits; | ||
413 | 407 | ||
414 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 408 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
415 | struct lockdep_map h_lockdep_map; | 409 | struct lockdep_map h_lockdep_map; |
416 | #endif | 410 | #endif |
417 | |||
418 | #ifdef CONFIG_JBD2_DEBUG | ||
419 | /* COW debugging counters: */ | ||
420 | unsigned int h_cow_moved; /* blocks moved to snapshot */ | ||
421 | unsigned int h_cow_copied; /* blocks copied to snapshot */ | ||
422 | unsigned int h_cow_ok_jh; /* blocks already COWed during current | ||
423 | transaction */ | ||
424 | unsigned int h_cow_ok_bitmap; /* blocks not set in COW bitmap */ | ||
425 | unsigned int h_cow_ok_mapped;/* blocks already mapped in snapshot */ | ||
426 | unsigned int h_cow_bitmaps; /* COW bitmaps created */ | ||
427 | unsigned int h_cow_excluded; /* blocks set in exclude bitmap */ | ||
428 | #endif | ||
429 | }; | 411 | }; |
430 | 412 | ||
431 | 413 | ||
@@ -581,6 +563,11 @@ struct transaction_s | |||
581 | unsigned long t_start; | 563 | unsigned long t_start; |
582 | 564 | ||
583 | /* | 565 | /* |
566 | * When commit was requested | ||
567 | */ | ||
568 | unsigned long t_requested; | ||
569 | |||
570 | /* | ||
584 | * Checkpointing stats [j_checkpoint_sem] | 571 | * Checkpointing stats [j_checkpoint_sem] |
585 | */ | 572 | */ |
586 | struct transaction_chp_stats_s t_chp_stats; | 573 | struct transaction_chp_stats_s t_chp_stats; |
@@ -637,6 +624,7 @@ struct transaction_s | |||
637 | 624 | ||
638 | struct transaction_run_stats_s { | 625 | struct transaction_run_stats_s { |
639 | unsigned long rs_wait; | 626 | unsigned long rs_wait; |
627 | unsigned long rs_request_delay; | ||
640 | unsigned long rs_running; | 628 | unsigned long rs_running; |
641 | unsigned long rs_locked; | 629 | unsigned long rs_locked; |
642 | unsigned long rs_flushing; | 630 | unsigned long rs_flushing; |
@@ -649,6 +637,7 @@ struct transaction_run_stats_s { | |||
649 | 637 | ||
650 | struct transaction_stats_s { | 638 | struct transaction_stats_s { |
651 | unsigned long ts_tid; | 639 | unsigned long ts_tid; |
640 | unsigned long ts_requested; | ||
652 | struct transaction_run_stats_s run; | 641 | struct transaction_run_stats_s run; |
653 | }; | 642 | }; |
654 | 643 | ||
@@ -1086,7 +1075,8 @@ static inline handle_t *journal_current_handle(void) | |||
1086 | */ | 1075 | */ |
1087 | 1076 | ||
1088 | extern handle_t *jbd2_journal_start(journal_t *, int nblocks); | 1077 | extern handle_t *jbd2_journal_start(journal_t *, int nblocks); |
1089 | extern handle_t *jbd2__journal_start(journal_t *, int nblocks, gfp_t gfp_mask); | 1078 | extern handle_t *jbd2__journal_start(journal_t *, int nblocks, gfp_t gfp_mask, |
1079 | unsigned int type, unsigned int line_no); | ||
1090 | extern int jbd2_journal_restart(handle_t *, int nblocks); | 1080 | extern int jbd2_journal_restart(handle_t *, int nblocks); |
1091 | extern int jbd2__journal_restart(handle_t *, int nblocks, gfp_t gfp_mask); | 1081 | extern int jbd2__journal_restart(handle_t *, int nblocks, gfp_t gfp_mask); |
1092 | extern int jbd2_journal_extend (handle_t *, int nblocks); | 1082 | extern int jbd2_journal_extend (handle_t *, int nblocks); |