1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct journal_s</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="up" href="data_types.html#structures" title="Structures"><link rel="prev" href="API-struct-jbd2-journal-handle.html" title="struct jbd2_journal_handle"><link rel="next" href="functions.html" title="Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct journal_s</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-jbd2-journal-handle.html">Prev</a> </td><th width="60%" align="center">Structures</th><td width="20%" align="right"> <a accesskey="n" href="functions.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-journal-s"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct journal_s — 2 The journal_s type is the concrete type associated with journal_t. 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct journal_s { 5 unsigned long j_flags; 6 int j_errno; 7 struct buffer_head * j_sb_buffer; 8 journal_superblock_t * j_superblock; 9 int j_format_version; 10 rwlock_t j_state_lock; 11 int j_barrier_count; 12 struct mutex j_barrier; 13 transaction_t * j_running_transaction; 14 transaction_t * j_committing_transaction; 15 transaction_t * j_checkpoint_transactions; 16 wait_queue_head_t j_wait_transaction_locked; 17 wait_queue_head_t j_wait_done_commit; 18 wait_queue_head_t j_wait_commit; 19 wait_queue_head_t j_wait_updates; 20 wait_queue_head_t j_wait_reserved; 21 struct mutex j_checkpoint_mutex; 22 unsigned long j_head; 23 unsigned long j_tail; 24 unsigned long j_free; 25 unsigned long j_first; 26 unsigned long j_last; 27 struct block_device * j_dev; 28 int j_blocksize; 29 unsigned long long j_blk_offset; 30 struct block_device * j_fs_dev; 31 unsigned int j_maxlen; 32 atomic_t j_reserved_credits; 33 spinlock_t j_list_lock; 34 struct inode * j_inode; 35 tid_t j_tail_sequence; 36 tid_t j_transaction_sequence; 37 tid_t j_commit_sequence; 38 tid_t j_commit_request; 39 __u8 j_uuid[16]; 40 struct task_struct * j_task; 41 int j_max_transaction_buffers; 42 unsigned long j_commit_interval; 43 struct timer_list j_commit_timer; 44 spinlock_t j_revoke_lock; 45 struct jbd2_revoke_table_s * j_revoke; 46 struct jbd2_revoke_table_s * j_revoke_table[2]; 47 struct buffer_head ** j_wbuf; 48 int j_wbufsize; 49 pid_t j_last_sync_writer; 50 spinlock_t j_history_lock; 51 struct proc_dir_entry * j_proc_entry; 52 struct transaction_stats_s j_stats; 53 void * j_private; 54}; </pre></div><div class="refsect1"><a name="id-1.8.4.3.6.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">j_flags</span></dt><dd><p> 55 General journaling state flags 56 </p></dd><dt><span class="term">j_errno</span></dt><dd><p> 57 Is there an outstanding uncleared error on the journal (from a 58 prior abort)? 59 </p></dd><dt><span class="term">j_sb_buffer</span></dt><dd><p> 60 First part of superblock buffer 61 </p></dd><dt><span class="term">j_superblock</span></dt><dd><p> 62 Second part of superblock buffer 63 </p></dd><dt><span class="term">j_format_version</span></dt><dd><p> 64 Version of the superblock format 65 </p></dd><dt><span class="term">j_state_lock</span></dt><dd><p> 66 Protect the various scalars in the journal 67 </p></dd><dt><span class="term">j_barrier_count</span></dt><dd><p> 68 Number of processes waiting to create a barrier lock 69 </p></dd><dt><span class="term">j_barrier</span></dt><dd><p> 70 The barrier lock itself 71 </p></dd><dt><span class="term">j_running_transaction</span></dt><dd><p> 72 The current running transaction.. 73 </p></dd><dt><span class="term">j_committing_transaction</span></dt><dd><p> 74 the transaction we are pushing to disk 75 </p></dd><dt><span class="term">j_checkpoint_transactions</span></dt><dd><p> 76 a linked circular list of all transactions 77 waiting for checkpointing 78 </p></dd><dt><span class="term">j_wait_transaction_locked</span></dt><dd><p> 79 Wait queue for waiting for a locked transaction 80 to start committing, or for a barrier lock to be released 81 </p></dd><dt><span class="term">j_wait_done_commit</span></dt><dd><p> 82 Wait queue for waiting for commit to complete 83 </p></dd><dt><span class="term">j_wait_commit</span></dt><dd><p> 84 Wait queue to trigger commit 85 </p></dd><dt><span class="term">j_wait_updates</span></dt><dd><p> 86 Wait queue to wait for updates to complete 87 </p></dd><dt><span class="term">j_wait_reserved</span></dt><dd><p> 88 Wait queue to wait for reserved buffer credits to drop 89 </p></dd><dt><span class="term">j_checkpoint_mutex</span></dt><dd><p> 90 Mutex for locking against concurrent checkpoints 91 </p></dd><dt><span class="term">j_head</span></dt><dd><p> 92 Journal head - identifies the first unused block in the journal 93 </p></dd><dt><span class="term">j_tail</span></dt><dd><p> 94 Journal tail - identifies the oldest still-used block in the 95 journal. 96 </p></dd><dt><span class="term">j_free</span></dt><dd><p> 97 Journal free - how many free blocks are there in the journal? 98 </p></dd><dt><span class="term">j_first</span></dt><dd><p> 99 The block number of the first usable block 100 </p></dd><dt><span class="term">j_last</span></dt><dd><p> 101 The block number one beyond the last usable block 102 </p></dd><dt><span class="term">j_dev</span></dt><dd><p> 103 Device where we store the journal 104 </p></dd><dt><span class="term">j_blocksize</span></dt><dd><p> 105 blocksize for the location where we store the journal. 106 </p></dd><dt><span class="term">j_blk_offset</span></dt><dd><p> 107 starting block offset for into the device where we store the 108 journal 109 </p></dd><dt><span class="term">j_fs_dev</span></dt><dd><p> 110 Device which holds the client fs. For internal journal this will 111 be equal to j_dev 112 </p></dd><dt><span class="term">j_maxlen</span></dt><dd><p> 113 Total maximum capacity of the journal region on disk. 114 </p></dd><dt><span class="term">j_reserved_credits</span></dt><dd><p> 115 Number of buffers reserved from the running transaction 116 </p></dd><dt><span class="term">j_list_lock</span></dt><dd><p> 117 Protects the buffer lists and internal buffer state. 118 </p></dd><dt><span class="term">j_inode</span></dt><dd><p> 119 Optional inode where we store the journal. If present, all journal 120 block numbers are mapped into this inode via <code class="function"><a class="link" href="API-bmap.html" title="bmap">bmap</a></code>. 121 </p></dd><dt><span class="term">j_tail_sequence</span></dt><dd><p> 122 Sequence number of the oldest transaction in the log 123 </p></dd><dt><span class="term">j_transaction_sequence</span></dt><dd><p> 124 Sequence number of the next transaction to grant 125 </p></dd><dt><span class="term">j_commit_sequence</span></dt><dd><p> 126 Sequence number of the most recently committed 127 transaction 128 </p></dd><dt><span class="term">j_commit_request</span></dt><dd><p> 129 Sequence number of the most recent transaction wanting 130 commit 131 </p></dd><dt><span class="term">j_uuid[16]</span></dt><dd><p> 132 Uuid of client object. 133 </p></dd><dt><span class="term">j_task</span></dt><dd><p> 134 Pointer to the current commit thread for this journal 135 </p></dd><dt><span class="term">j_max_transaction_buffers</span></dt><dd><p> 136 Maximum number of metadata buffers to allow in a 137 single compound commit transaction 138 </p></dd><dt><span class="term">j_commit_interval</span></dt><dd><p> 139 What is the maximum transaction lifetime before we begin 140 a commit? 141 </p></dd><dt><span class="term">j_commit_timer</span></dt><dd><p> 142 The timer used to wakeup the commit thread 143 </p></dd><dt><span class="term">j_revoke_lock</span></dt><dd><p> 144 Protect the revoke table 145 </p></dd><dt><span class="term">j_revoke</span></dt><dd><p> 146 The revoke table - maintains the list of revoked blocks in the 147 current transaction. 148 </p></dd><dt><span class="term">j_revoke_table[2]</span></dt><dd><p> 149 alternate revoke tables for j_revoke 150 </p></dd><dt><span class="term">j_wbuf</span></dt><dd><p> 151 array of buffer_heads for jbd2_journal_commit_transaction 152 </p></dd><dt><span class="term">j_wbufsize</span></dt><dd><p> 153 maximum number of buffer_heads allowed in j_wbuf, the 154 number that will fit in j_blocksize 155 </p></dd><dt><span class="term">j_last_sync_writer</span></dt><dd><p> 156 most recent pid which did a synchronous write 157 </p></dd><dt><span class="term">j_history_lock</span></dt><dd><p> 158 Protect the transactions statistics history 159 </p></dd><dt><span class="term">j_proc_entry</span></dt><dd><p> 160 procfs entry for the jbd statistics directory 161 </p></dd><dt><span class="term">j_stats</span></dt><dd><p> 162 Overall statistics 163 </p></dd><dt><span class="term">j_private</span></dt><dd><p> 164 An opaque pointer to fs-private information. 165 </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-jbd2-journal-handle.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="data_types.html#structures">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct jbd2_journal_handle</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Functions</td></tr></table></div></body></html> 166