mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
ext4 / jbd2: add fast commit initialization
This patch adds fast commit area trackers in the journal_t structure. These are initialized via the jbd2_fc_init() routine that this patch adds. This patch also adds ext4/fast_commit.c and ext4/fast_commit.h files for fast commit code that will be added in subsequent patches in this series. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com> Link: https://lore.kernel.org/r/20201015203802.3597742-4-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
995a3ed67f
commit
6866d7b3f2
@@ -918,6 +918,30 @@ struct journal_s
|
||||
*/
|
||||
unsigned long j_last;
|
||||
|
||||
/**
|
||||
* @j_fc_first:
|
||||
*
|
||||
* The block number of the first fast commit block in the journal
|
||||
* [j_state_lock].
|
||||
*/
|
||||
unsigned long j_fc_first;
|
||||
|
||||
/**
|
||||
* @j_fc_off:
|
||||
*
|
||||
* Number of fast commit blocks currently allocated.
|
||||
* [j_state_lock].
|
||||
*/
|
||||
unsigned long j_fc_off;
|
||||
|
||||
/**
|
||||
* @j_fc_last:
|
||||
*
|
||||
* The block number one beyond the last fast commit block in the journal
|
||||
* [j_state_lock].
|
||||
*/
|
||||
unsigned long j_fc_last;
|
||||
|
||||
/**
|
||||
* @j_dev: Device where we store the journal.
|
||||
*/
|
||||
@@ -1068,6 +1092,12 @@ struct journal_s
|
||||
*/
|
||||
struct buffer_head **j_wbuf;
|
||||
|
||||
/**
|
||||
* @j_fc_wbuf: Array of fast commit bhs for
|
||||
* jbd2_journal_commit_transaction.
|
||||
*/
|
||||
struct buffer_head **j_fc_wbuf;
|
||||
|
||||
/**
|
||||
* @j_wbufsize:
|
||||
*
|
||||
@@ -1075,6 +1105,13 @@ struct journal_s
|
||||
*/
|
||||
int j_wbufsize;
|
||||
|
||||
/**
|
||||
* @j_fc_wbufsize:
|
||||
*
|
||||
* Size of @j_fc_wbuf array.
|
||||
*/
|
||||
int j_fc_wbufsize;
|
||||
|
||||
/**
|
||||
* @j_last_sync_writer:
|
||||
*
|
||||
@@ -1535,6 +1572,8 @@ void __jbd2_log_wait_for_space(journal_t *journal);
|
||||
extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *);
|
||||
extern int jbd2_cleanup_journal_tail(journal_t *);
|
||||
|
||||
/* Fast commit related APIs */
|
||||
int jbd2_fc_init(journal_t *journal, int num_fc_blks);
|
||||
/*
|
||||
* is_journal_abort
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user