diff options
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 27e79c27ba0..a32dcaec04e 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -432,13 +432,35 @@ struct jbd2_journal_handle | |||
432 | int h_err; | 432 | int h_err; |
433 | 433 | ||
434 | /* Flags [no locking] */ | 434 | /* Flags [no locking] */ |
435 | unsigned int h_sync: 1; /* sync-on-close */ | 435 | unsigned int h_sync:1; /* sync-on-close */ |
436 | unsigned int h_jdata: 1; /* force data journaling */ | 436 | unsigned int h_jdata:1; /* force data journaling */ |
437 | unsigned int h_aborted: 1; /* fatal error on handle */ | 437 | unsigned int h_aborted:1; /* fatal error on handle */ |
438 | unsigned int h_cowing:1; /* COWing block to snapshot */ | ||
439 | |||
440 | /* Number of buffers requested by user: | ||
441 | * (before adding the COW credits factor) */ | ||
442 | unsigned int h_base_credits:14; | ||
443 | |||
444 | /* Number of buffers the user is allowed to dirty: | ||
445 | * (counts only buffers dirtied when !h_cowing) */ | ||
446 | unsigned int h_user_credits:14; | ||
447 | |||
438 | 448 | ||
439 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 449 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
440 | struct lockdep_map h_lockdep_map; | 450 | struct lockdep_map h_lockdep_map; |
441 | #endif | 451 | #endif |
452 | |||
453 | #ifdef CONFIG_JBD2_DEBUG | ||
454 | /* COW debugging counters: */ | ||
455 | unsigned int h_cow_moved; /* blocks moved to snapshot */ | ||
456 | unsigned int h_cow_copied; /* blocks copied to snapshot */ | ||
457 | unsigned int h_cow_ok_jh; /* blocks already COWed during current | ||
458 | transaction */ | ||
459 | unsigned int h_cow_ok_bitmap; /* blocks not set in COW bitmap */ | ||
460 | unsigned int h_cow_ok_mapped;/* blocks already mapped in snapshot */ | ||
461 | unsigned int h_cow_bitmaps; /* COW bitmaps created */ | ||
462 | unsigned int h_cow_excluded; /* blocks set in exclude bitmap */ | ||
463 | #endif | ||
442 | }; | 464 | }; |
443 | 465 | ||
444 | 466 | ||