<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><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.75.2" /><link rel="home" href="index.html" title="Linux Filesystems API" /><link rel="up" href="ch05s02.html#structures" title="Structures" /><link rel="prev" href="re174.html" title="struct handle_s" /><link rel="next" href="ch05s03.html" title="Functions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct journal_s</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re174.html">Prev</a> </td><th width="60%" align="center">Structures</th><td width="20%" align="right"> <a accesskey="n" href="ch05s03.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct journal_s"><a id="API-struct-journal-s"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct journal_s — this is the concrete type associated with journal_t. </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting"> struct journal_s { unsigned long j_flags; int j_errno; struct buffer_head * j_sb_buffer; journal_superblock_t * j_superblock; int j_format_version; spinlock_t j_state_lock; int j_barrier_count; struct mutex j_barrier; transaction_t * j_running_transaction; transaction_t * j_committing_transaction; transaction_t * j_checkpoint_transactions; wait_queue_head_t j_wait_transaction_locked; wait_queue_head_t j_wait_logspace; wait_queue_head_t j_wait_done_commit; wait_queue_head_t j_wait_checkpoint; wait_queue_head_t j_wait_commit; wait_queue_head_t j_wait_updates; struct mutex j_checkpoint_mutex; unsigned int j_head; unsigned int j_tail; unsigned int j_free; unsigned int j_first; unsigned int j_last; struct block_device * j_dev; int j_blocksize; unsigned int j_blk_offset; struct block_device * j_fs_dev; unsigned int j_maxlen; spinlock_t j_list_lock; struct inode * j_inode; tid_t j_tail_sequence; tid_t j_transaction_sequence; tid_t j_commit_sequence; tid_t j_commit_request; __u8 j_uuid[16]; struct task_struct * j_task; int j_max_transaction_buffers; unsigned long j_commit_interval; struct timer_list j_commit_timer; spinlock_t j_revoke_lock; struct jbd_revoke_table_s * j_revoke; struct jbd_revoke_table_s * j_revoke_table[2]; struct buffer_head ** j_wbuf; int j_wbufsize; pid_t j_last_sync_writer; u64 j_average_commit_time; void * j_private; }; </pre></div><div class="refsect1" title="Members"><a id="id3125078"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">j_flags</span></dt><dd><p> General journaling state flags </p></dd><dt><span class="term">j_errno</span></dt><dd><p> Is there an outstanding uncleared error on the journal (from a prior abort)? </p></dd><dt><span class="term">j_sb_buffer</span></dt><dd><p> First part of superblock buffer </p></dd><dt><span class="term">j_superblock</span></dt><dd><p> Second part of superblock buffer </p></dd><dt><span class="term">j_format_version</span></dt><dd><p> Version of the superblock format </p></dd><dt><span class="term">j_state_lock</span></dt><dd><p> Protect the various scalars in the journal </p></dd><dt><span class="term">j_barrier_count</span></dt><dd><p> Number of processes waiting to create a barrier lock </p></dd><dt><span class="term">j_barrier</span></dt><dd><p> The barrier lock itself </p></dd><dt><span class="term">j_running_transaction</span></dt><dd><p> The current running transaction.. </p></dd><dt><span class="term">j_committing_transaction</span></dt><dd><p> the transaction we are pushing to disk </p></dd><dt><span class="term">j_checkpoint_transactions</span></dt><dd><p> a linked circular list of all transactions waiting for checkpointing </p></dd><dt><span class="term">j_wait_transaction_locked</span></dt><dd><p> Wait queue for waiting for a locked transaction to start committing, or for a barrier lock to be released </p></dd><dt><span class="term">j_wait_logspace</span></dt><dd><p> Wait queue for waiting for checkpointing to complete </p></dd><dt><span class="term">j_wait_done_commit</span></dt><dd><p> Wait queue for waiting for commit to complete </p></dd><dt><span class="term">j_wait_checkpoint</span></dt><dd><p> Wait queue to trigger checkpointing </p></dd><dt><span class="term">j_wait_commit</span></dt><dd><p> Wait queue to trigger commit </p></dd><dt><span class="term">j_wait_updates</span></dt><dd><p> Wait queue to wait for updates to complete </p></dd><dt><span class="term">j_checkpoint_mutex</span></dt><dd><p> Mutex for locking against concurrent checkpoints </p></dd><dt><span class="term">j_head</span></dt><dd><p> Journal head - identifies the first unused block in the journal </p></dd><dt><span class="term">j_tail</span></dt><dd><p> Journal tail - identifies the oldest still-used block in the journal. </p></dd><dt><span class="term">j_free</span></dt><dd><p> Journal free - how many free blocks are there in the journal? </p></dd><dt><span class="term">j_first</span></dt><dd><p> The block number of the first usable block </p></dd><dt><span class="term">j_last</span></dt><dd><p> The block number one beyond the last usable block </p></dd><dt><span class="term">j_dev</span></dt><dd><p> Device where we store the journal </p></dd><dt><span class="term">j_blocksize</span></dt><dd><p> blocksize for the location where we store the journal. </p></dd><dt><span class="term">j_blk_offset</span></dt><dd><p> starting block offset for into the device where we store the journal </p></dd><dt><span class="term">j_fs_dev</span></dt><dd><p> Device which holds the client fs. For internal journal this will be equal to j_dev </p></dd><dt><span class="term">j_maxlen</span></dt><dd><p> Total maximum capacity of the journal region on disk. </p></dd><dt><span class="term">j_list_lock</span></dt><dd><p> Protects the buffer lists and internal buffer state. </p></dd><dt><span class="term">j_inode</span></dt><dd><p> Optional inode where we store the journal. If present, all journal block numbers are mapped into this inode via <code class="function">bmap</code>. </p></dd><dt><span class="term">j_tail_sequence</span></dt><dd><p> Sequence number of the oldest transaction in the log </p></dd><dt><span class="term">j_transaction_sequence</span></dt><dd><p> Sequence number of the next transaction to grant </p></dd><dt><span class="term">j_commit_sequence</span></dt><dd><p> Sequence number of the most recently committed transaction </p></dd><dt><span class="term">j_commit_request</span></dt><dd><p> Sequence number of the most recent transaction wanting commit </p></dd><dt><span class="term">j_uuid[16]</span></dt><dd><p> Uuid of client object. </p></dd><dt><span class="term">j_task</span></dt><dd><p> Pointer to the current commit thread for this journal </p></dd><dt><span class="term">j_max_transaction_buffers</span></dt><dd><p> Maximum number of metadata buffers to allow in a single compound commit transaction </p></dd><dt><span class="term">j_commit_interval</span></dt><dd><p> What is the maximum transaction lifetime before we begin a commit? </p></dd><dt><span class="term">j_commit_timer</span></dt><dd><p> The timer used to wakeup the commit thread </p></dd><dt><span class="term">j_revoke_lock</span></dt><dd><p> Protect the revoke table </p></dd><dt><span class="term">j_revoke</span></dt><dd><p> The revoke table - maintains the list of revoked blocks in the current transaction. </p></dd><dt><span class="term">j_revoke_table[2]</span></dt><dd><p> alternate revoke tables for j_revoke </p></dd><dt><span class="term">j_wbuf</span></dt><dd><p> array of buffer_heads for journal_commit_transaction </p></dd><dt><span class="term">j_wbufsize</span></dt><dd><p> maximum number of buffer_heads allowed in j_wbuf, the number that will fit in j_blocksize </p></dd><dt><span class="term">j_last_sync_writer</span></dt><dd><p> most recent pid which did a synchronous write </p></dd><dt><span class="term">j_average_commit_time</span></dt><dd><p> the average amount of time in nanoseconds it takes to commit a transaction to the disk. </p></dd><dt><span class="term">j_private</span></dt><dd><p> An opaque pointer to fs-private information. </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="re174.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch05s02.html#structures">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch05s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>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>