1STRUCT JOURNAL_S(9) The Linux Journalling API STRUCT JOURNAL_S(9)
2
3
4
6 struct_journal_s - this is the concrete type associated with journal_t.
7
9 struct journal_s {
10 unsigned long j_flags;
11 int j_errno;
12 struct buffer_head * j_sb_buffer;
13 journal_superblock_t * j_superblock;
14 int j_format_version;
15 spinlock_t j_state_lock;
16 int j_barrier_count;
17 transaction_t * j_running_transaction;
18 transaction_t * j_committing_transaction;
19 transaction_t * j_checkpoint_transactions;
20 wait_queue_head_t j_wait_transaction_locked;
21 wait_queue_head_t j_wait_logspace;
22 wait_queue_head_t j_wait_done_commit;
23 wait_queue_head_t j_wait_checkpoint;
24 wait_queue_head_t j_wait_commit;
25 wait_queue_head_t j_wait_updates;
26 struct mutex j_checkpoint_mutex;
27 unsigned int j_head;
28 unsigned int j_tail;
29 unsigned int j_free;
30 unsigned int j_first;
31 unsigned int j_last;
32 struct block_device * j_dev;
33 int j_blocksize;
34 unsigned int j_blk_offset;
35 struct block_device * j_fs_dev;
36 unsigned int j_maxlen;
37 spinlock_t j_list_lock;
38 struct inode * j_inode;
39 tid_t j_tail_sequence;
40 tid_t j_transaction_sequence;
41 tid_t j_commit_sequence;
42 tid_t j_commit_request;
43 __u8 j_uuid[16];
44 struct task_struct * j_task;
45 int j_max_transaction_buffers;
46 unsigned long j_commit_interval;
47 struct timer_list j_commit_timer;
48 spinlock_t j_revoke_lock;
49 struct jbd_revoke_table_s * j_revoke;
50 struct jbd_revoke_table_s * j_revoke_table[2];
51 struct buffer_head ** j_wbuf;
52 int j_wbufsize;
53 pid_t j_last_sync_writer;
54 u64 j_average_commit_time;
55 void * j_private;
56 };
57
59 j_flags
60 General journaling state flags
61
62 j_errno
63 Is there an outstanding uncleared error on the journal (from a
64 prior abort)?
65
66 j_sb_buffer
67 First part of superblock buffer
68
69 j_superblock
70 Second part of superblock buffer
71
72 j_format_version
73 Version of the superblock format
74
75 j_state_lock
76 Protect the various scalars in the journal
77
78 j_barrier_count
79 Number of processes waiting to create a barrier lock
80
81 j_running_transaction
82 The current running transaction..
83
84 j_committing_transaction
85 the transaction we are pushing to disk
86
87 j_checkpoint_transactions
88 a linked circular list of all transactions waiting for
89 checkpointing
90
91 j_wait_transaction_locked
92 Wait queue for waiting for a locked transaction to start
93 committing, or for a barrier lock to be released
94
95 j_wait_logspace
96 Wait queue for waiting for checkpointing to complete
97
98 j_wait_done_commit
99 Wait queue for waiting for commit to complete
100
101 j_wait_checkpoint
102 Wait queue to trigger checkpointing
103
104 j_wait_commit
105 Wait queue to trigger commit
106
107 j_wait_updates
108 Wait queue to wait for updates to complete
109
110 j_checkpoint_mutex
111 Mutex for locking against concurrent checkpoints
112
113 j_head
114 Journal head - identifies the first unused block in the journal
115
116 j_tail
117 Journal tail - identifies the oldest still-used block in the
118 journal.
119
120 j_free
121 Journal free - how many free blocks are there in the journal?
122
123 j_first
124 The block number of the first usable block
125
126 j_last
127 The block number one beyond the last usable block
128
129 j_dev
130 Device where we store the journal
131
132 j_blocksize
133 blocksize for the location where we store the journal.
134
135 j_blk_offset
136 starting block offset for into the device where we store the
137 journal
138
139 j_fs_dev
140 Device which holds the client fs. For internal journal this will be
141 equal to j_dev
142
143 j_maxlen
144 Total maximum capacity of the journal region on disk.
145
146 j_list_lock
147 Protects the buffer lists and internal buffer state.
148
149 j_inode
150 Optional inode where we store the journal. If present, all journal
151 block numbers are mapped into this inode via bmap.
152
153 j_tail_sequence
154 Sequence number of the oldest transaction in the log
155
156 j_transaction_sequence
157 Sequence number of the next transaction to grant
158
159 j_commit_sequence
160 Sequence number of the most recently committed transaction
161
162 j_commit_request
163 Sequence number of the most recent transaction wanting commit
164
165 j_uuid[16]
166 Uuid of client object.
167
168 j_task
169 Pointer to the current commit thread for this journal
170
171 j_max_transaction_buffers
172 Maximum number of metadata buffers to allow in a single compound
173 commit transaction
174
175 j_commit_interval
176 What is the maximum transaction lifetime before we begin a commit?
177
178 j_commit_timer
179 The timer used to wakeup the commit thread
180
181 j_revoke_lock
182 Protect the revoke table
183
184 j_revoke
185 The revoke table - maintains the list of revoked blocks in the
186 current transaction.
187
188 j_revoke_table[2]
189 alternate revoke tables for j_revoke
190
191 j_wbuf
192 array of buffer_heads for journal_commit_transaction
193
194 j_wbufsize
195 maximum number of buffer_heads allowed in j_wbuf, the number that
196 will fit in j_blocksize
197
198 j_last_sync_writer
199 most recent pid which did a synchronous write
200
201 j_average_commit_time
202 the average amount of time in nanoseconds it takes to commit a
203 transaction to the disk.
204
205 j_private
206 An opaque pointer to fs-private information.
207
209 Roger Gammans <rgammans@computer-surgery.co.uk>
210 Author.
211
212 Stephen Tweedie <sct@redhat.com>
213 Author.
214
216Kernel Hackers Manual 2.6. June 2019 STRUCT JOURNAL_S(9)