1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><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-handle-s.html" title="struct handle_s"><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-handle-s.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 this 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 spinlock_t j_state_lock; 11 int j_barrier_count; 12 transaction_t * j_running_transaction; 13 transaction_t * j_committing_transaction; 14 transaction_t * j_checkpoint_transactions; 15 wait_queue_head_t j_wait_transaction_locked; 16 wait_queue_head_t j_wait_logspace; 17 wait_queue_head_t j_wait_done_commit; 18 wait_queue_head_t j_wait_checkpoint; 19 wait_queue_head_t j_wait_commit; 20 wait_queue_head_t j_wait_updates; 21 struct mutex j_checkpoint_mutex; 22 unsigned int j_head; 23 unsigned int j_tail; 24 unsigned int j_free; 25 unsigned int j_first; 26 unsigned int j_last; 27 struct block_device * j_dev; 28 int j_blocksize; 29 unsigned int j_blk_offset; 30 struct block_device * j_fs_dev; 31 unsigned int j_maxlen; 32 spinlock_t j_list_lock; 33 struct inode * j_inode; 34 tid_t j_tail_sequence; 35 tid_t j_transaction_sequence; 36 tid_t j_commit_sequence; 37 tid_t j_commit_request; 38 tid_t j_commit_waited; 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 jbd_revoke_table_s * j_revoke; 46 struct jbd_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 u64 j_average_commit_time; 51 void * j_private; 52}; </pre></div><div class="refsect1"><a name="idp1103645396"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">j_flags</span></dt><dd><p> 53 General journaling state flags 54 </p></dd><dt><span class="term">j_errno</span></dt><dd><p> 55 Is there an outstanding uncleared error on the journal (from a 56 prior abort)? 57 </p></dd><dt><span class="term">j_sb_buffer</span></dt><dd><p> 58 First part of superblock buffer 59 </p></dd><dt><span class="term">j_superblock</span></dt><dd><p> 60 Second part of superblock buffer 61 </p></dd><dt><span class="term">j_format_version</span></dt><dd><p> 62 Version of the superblock format 63 </p></dd><dt><span class="term">j_state_lock</span></dt><dd><p> 64 Protect the various scalars in the journal 65 </p></dd><dt><span class="term">j_barrier_count</span></dt><dd><p> 66 Number of processes waiting to create a barrier lock 67 </p></dd><dt><span class="term">j_running_transaction</span></dt><dd><p> 68 The current running transaction.. 69 </p></dd><dt><span class="term">j_committing_transaction</span></dt><dd><p> 70 the transaction we are pushing to disk 71 </p></dd><dt><span class="term">j_checkpoint_transactions</span></dt><dd><p> 72 a linked circular list of all transactions 73 waiting for checkpointing 74 </p></dd><dt><span class="term">j_wait_transaction_locked</span></dt><dd><p> 75 Wait queue for waiting for a locked transaction 76 to start committing, or for a barrier lock to be released 77 </p></dd><dt><span class="term">j_wait_logspace</span></dt><dd><p> 78 Wait queue for waiting for checkpointing to complete 79 </p></dd><dt><span class="term">j_wait_done_commit</span></dt><dd><p> 80 Wait queue for waiting for commit to complete 81 </p></dd><dt><span class="term">j_wait_checkpoint</span></dt><dd><p> 82 Wait queue to trigger checkpointing 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_checkpoint_mutex</span></dt><dd><p> 88 Mutex for locking against concurrent checkpoints 89 </p></dd><dt><span class="term">j_head</span></dt><dd><p> 90 Journal head - identifies the first unused block in the journal 91 </p></dd><dt><span class="term">j_tail</span></dt><dd><p> 92 Journal tail - identifies the oldest still-used block in the 93 journal. 94 </p></dd><dt><span class="term">j_free</span></dt><dd><p> 95 Journal free - how many free blocks are there in the journal? 96 </p></dd><dt><span class="term">j_first</span></dt><dd><p> 97 The block number of the first usable block 98 </p></dd><dt><span class="term">j_last</span></dt><dd><p> 99 The block number one beyond the last usable block 100 </p></dd><dt><span class="term">j_dev</span></dt><dd><p> 101 Device where we store the journal 102 </p></dd><dt><span class="term">j_blocksize</span></dt><dd><p> 103 blocksize for the location where we store the journal. 104 </p></dd><dt><span class="term">j_blk_offset</span></dt><dd><p> 105 starting block offset for into the device where we store the 106 journal 107 </p></dd><dt><span class="term">j_fs_dev</span></dt><dd><p> 108 Device which holds the client fs. For internal journal this will 109 be equal to j_dev 110 </p></dd><dt><span class="term">j_maxlen</span></dt><dd><p> 111 Total maximum capacity of the journal region on disk. 112 </p></dd><dt><span class="term">j_list_lock</span></dt><dd><p> 113 Protects the buffer lists and internal buffer state. 114 </p></dd><dt><span class="term">j_inode</span></dt><dd><p> 115 Optional inode where we store the journal. If present, all journal 116 block numbers are mapped into this inode via <code class="function">bmap</code>. 117 </p></dd><dt><span class="term">j_tail_sequence</span></dt><dd><p> 118 Sequence number of the oldest transaction in the log 119 </p></dd><dt><span class="term">j_transaction_sequence</span></dt><dd><p> 120 Sequence number of the next transaction to grant 121 </p></dd><dt><span class="term">j_commit_sequence</span></dt><dd><p> 122 Sequence number of the most recently committed 123 transaction 124 </p></dd><dt><span class="term">j_commit_request</span></dt><dd><p> 125 Sequence number of the most recent transaction wanting 126 commit 127 </p></dd><dt><span class="term">j_commit_waited</span></dt><dd><p> 128 Sequence number of the most recent transaction someone 129 is waiting for to commit. 130 </p></dd><dt><span class="term">j_uuid[16]</span></dt><dd><p> 131 Uuid of client object. 132 </p></dd><dt><span class="term">j_task</span></dt><dd><p> 133 Pointer to the current commit thread for this journal 134 </p></dd><dt><span class="term">j_max_transaction_buffers</span></dt><dd><p> 135 Maximum number of metadata buffers to allow in a 136 single compound commit transaction 137 </p></dd><dt><span class="term">j_commit_interval</span></dt><dd><p> 138 What is the maximum transaction lifetime before we begin 139 a commit? 140 </p></dd><dt><span class="term">j_commit_timer</span></dt><dd><p> 141 The timer used to wakeup the commit thread 142 </p></dd><dt><span class="term">j_revoke_lock</span></dt><dd><p> 143 Protect the revoke table 144 </p></dd><dt><span class="term">j_revoke</span></dt><dd><p> 145 The revoke table - maintains the list of revoked blocks in the 146 current transaction. 147 </p></dd><dt><span class="term">j_revoke_table[2]</span></dt><dd><p> 148 alternate revoke tables for j_revoke 149 </p></dd><dt><span class="term">j_wbuf</span></dt><dd><p> 150 array of buffer_heads for journal_commit_transaction 151 </p></dd><dt><span class="term">j_wbufsize</span></dt><dd><p> 152 maximum number of buffer_heads allowed in j_wbuf, the 153 number that will fit in j_blocksize 154 </p></dd><dt><span class="term">j_last_sync_writer</span></dt><dd><p> 155 most recent pid which did a synchronous write 156 </p></dd><dt><span class="term">j_average_commit_time</span></dt><dd><p> 157 the average amount of time in nanoseconds it 158 takes to commit a transaction to the disk. 159 </p></dd><dt><span class="term">j_private</span></dt><dd><p> 160 An opaque pointer to fs-private information. 161 </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-handle-s.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 handle_s</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> 162