diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-04 12:59:57 +0000 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-04 12:59:57 +0000 |
| commit | 679728c0312fcc766e5ca5aafcfa7fa53406ebae (patch) | |
| tree | 11d63386860af238422ee49d82324eaff1e3f2e4 | |
| parent | f7eb061d6c5e916767b66d952993bbb66d0fc8f7 (diff) | |
ext4_journal: add transaction in-memory structure.
| -rw-r--r-- | lwext4/ext4_types.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lwext4/ext4_types.h b/lwext4/ext4_types.h index 5b8441d..36dca0c 100644 --- a/lwext4/ext4_types.h +++ b/lwext4/ext4_types.h @@ -1093,6 +1093,33 @@ struct jbd_fs { bool dirty; }; +struct jbd_buf { + struct ext4_block block; + struct ext4_block block_jbd; + + struct jbd_trans *trans; + + LIST_ENTRY(jbd_buf) buf_node; +}; + +struct jbd_trans { + uint32_t trans_id; + LIST_HEAD(jbd_trans_buf, jbd_buf) buf_list; + LIST_ENTRY(jbd_trans) trans_node; +}; + +struct jbd_journal { + uint32_t first; + uint32_t start; + uint32_t last; + uint32_t first_trans_id; + uint32_t last_trans_id; + + LIST_HEAD(jbd_trans_list, jbd_trans) trans_list; + + struct jbd_fs *jbd_fs; +}; + /*****************************************************************************/ #define EXT4_CRC32_INIT (0xFFFFFFFFUL) |
