diff options
Diffstat (limited to 'e2fsprogs/ext2fs/kernel-jbd.h')
-rw-r--r-- | e2fsprogs/ext2fs/kernel-jbd.h | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/e2fsprogs/ext2fs/kernel-jbd.h b/e2fsprogs/ext2fs/kernel-jbd.h index d0efdb3f7..8a5de5e3e 100644 --- a/e2fsprogs/ext2fs/kernel-jbd.h +++ b/e2fsprogs/ext2fs/kernel-jbd.h @@ -1,6 +1,6 @@ /* * linux/include/linux/jbd.h - * + * * Written by Stephen C. Tweedie <sct@redhat.com> * * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved @@ -51,7 +51,7 @@ extern int journal_enable_debug; if ((n) <= journal_enable_debug) { \ printk (KERN_DEBUG "(%s, %d): %s: ", \ __FILE__, __LINE__, __FUNCTION__); \ - printk (f, ## a); \ + printk (f, ## a); \ } \ } while (0) #else @@ -59,7 +59,7 @@ extern int journal_enable_debug; #define jbd_debug(f, a...) /**/ #else #define jbd_debug(f, ...) /**/ -#endif +#endif #endif #else #define jbd_debug(x) /* AIX doesn't do STDC */ @@ -88,7 +88,7 @@ typedef struct journal_s journal_t; /* Journal control structure */ * On-disk structures */ -/* +/* * Descriptor block types: */ @@ -109,8 +109,8 @@ typedef struct journal_header_s } journal_header_t; -/* - * The block tag: used to describe a single buffer in the journal +/* + * The block tag: used to describe a single buffer in the journal */ typedef struct journal_block_tag_s { @@ -118,9 +118,9 @@ typedef struct journal_block_tag_s __u32 t_flags; /* See below */ } journal_block_tag_t; -/* +/* * The revoke descriptor: used on disk to describe a series of blocks to - * be revoked from the log + * be revoked from the log */ typedef struct journal_revoke_header_s { @@ -149,7 +149,7 @@ typedef struct journal_superblock_s __u32 s_blocksize; /* journal device blocksize */ __u32 s_maxlen; /* total blocks in journal file */ __u32 s_first; /* first block of log information */ - + /* 0x0018 */ /* Dynamic information describing the current state of the log */ __u32 s_sequence; /* first commit ID expected in log */ @@ -161,17 +161,17 @@ typedef struct journal_superblock_s /* 0x0024 */ /* Remaining fields are only valid in a version-2 superblock */ - __u32 s_feature_compat; /* compatible feature set */ - __u32 s_feature_incompat; /* incompatible feature set */ - __u32 s_feature_ro_compat; /* readonly-compatible feature set */ + __u32 s_feature_compat; /* compatible feature set */ + __u32 s_feature_incompat; /* incompatible feature set */ + __u32 s_feature_ro_compat; /* readonly-compatible feature set */ /* 0x0030 */ __u8 s_uuid[16]; /* 128-bit uuid for journal */ /* 0x0040 */ __u32 s_nr_users; /* Nr of filesystems sharing log */ - + __u32 s_dynsuper; /* Blocknr of dynamic superblock copy*/ - + /* 0x0048 */ __u32 s_max_transaction; /* Limit of journal blocks per trans.*/ __u32 s_max_trans_data; /* Limit of data blocks per trans. */ @@ -276,7 +276,7 @@ struct jbd_revoke_table_s; * the transaction, so that at all times we know how many buffers the * outstanding updates on a transaction might possibly touch. */ -struct handle_s +struct handle_s { /* Which compound transaction is this update a part of? */ transaction_t * h_transaction; @@ -314,14 +314,14 @@ struct handle_s * flushed to home for finished transactions. */ -struct transaction_s +struct transaction_s { /* Pointer to the journal for this transaction. */ journal_t * t_journal; - + /* Sequence number for this transaction */ tid_t t_tid; - + /* Transaction's current state */ enum { T_RUNNING, @@ -329,74 +329,74 @@ struct transaction_s T_RUNDOWN, T_FLUSH, T_COMMIT, - T_FINISHED + T_FINISHED } t_state; /* Where in the log does this transaction's commit start? */ unsigned long t_log_start; - + /* Doubly-linked circular list of all inodes owned by this - transaction */ /* AKPM: unused */ + transaction */ /* AKPM: unused */ struct inode * t_ilist; - + /* Number of buffers on the t_buffers list */ int t_nr_buffers; - + /* Doubly-linked circular list of all buffers reserved but not - yet modified by this transaction */ + yet modified by this transaction */ struct journal_head * t_reserved_list; - + /* Doubly-linked circular list of all metadata buffers owned by this - transaction */ + transaction */ struct journal_head * t_buffers; - + /* * Doubly-linked circular list of all data buffers still to be * flushed before this transaction can be committed. * Protected by journal_datalist_lock. */ struct journal_head * t_sync_datalist; - + /* * Doubly-linked circular list of all writepage data buffers * still to be written before this transaction can be committed. * Protected by journal_datalist_lock. */ struct journal_head * t_async_datalist; - + /* Doubly-linked circular list of all forget buffers (superceded - buffers which we can un-checkpoint once this transaction - commits) */ + buffers which we can un-checkpoint once this transaction + commits) */ struct journal_head * t_forget; - + /* * Doubly-linked circular list of all buffers still to be * flushed before this transaction can be checkpointed. */ /* Protected by journal_datalist_lock */ struct journal_head * t_checkpoint_list; - + /* Doubly-linked circular list of temporary buffers currently - undergoing IO in the log */ + undergoing IO in the log */ struct journal_head * t_iobuf_list; - + /* Doubly-linked circular list of metadata buffers being - shadowed by log IO. The IO buffers on the iobuf list and the - shadow buffers on this list match each other one for one at - all times. */ + shadowed by log IO. The IO buffers on the iobuf list and the + shadow buffers on this list match each other one for one at + all times. */ struct journal_head * t_shadow_list; - + /* Doubly-linked circular list of control buffers being written - to the log. */ + to the log. */ struct journal_head * t_log_list; - + /* Number of outstanding updates running on this transaction */ int t_updates; /* Number of buffers reserved for use by all handles in this * transaction handle but not yet modified. */ int t_outstanding_credits; - + /* * Forward and backward links for the circular list of all * transactions awaiting checkpoint. @@ -415,7 +415,7 @@ struct transaction_s /* The journal_t maintains all of the journaling state information for a * single filesystem. It is linked to from the fs superblock structure. - * + * * We use the journal_t to keep track of all outstanding transaction * activity on the filesystem, and to manage the state of the log * writing process. */ @@ -428,7 +428,7 @@ struct journal_s /* Is there an outstanding uncleared error on the journal (from * a prior abort)? */ int j_errno; - + /* The superblock buffer */ struct buffer_head * j_sb_buffer; journal_superblock_t * j_superblock; @@ -438,49 +438,49 @@ struct journal_s /* Number of processes waiting to create a barrier lock */ int j_barrier_count; - + /* The barrier lock itself */ struct semaphore j_barrier; - + /* Transactions: The current running transaction... */ transaction_t * j_running_transaction; - + /* ... the transaction we are pushing to disk ... */ transaction_t * j_committing_transaction; - + /* ... and a linked circular list of all transactions waiting * for checkpointing. */ /* Protected by journal_datalist_lock */ transaction_t * j_checkpoint_transactions; /* Wait queue for waiting for a locked transaction to start - committing, or for a barrier lock to be released */ + committing, or for a barrier lock to be released */ wait_queue_head_t j_wait_transaction_locked; - + /* Wait queue for waiting for checkpointing to complete */ wait_queue_head_t j_wait_logspace; - + /* Wait queue for waiting for commit to complete */ wait_queue_head_t j_wait_done_commit; - + /* Wait queue to trigger checkpointing */ wait_queue_head_t j_wait_checkpoint; - + /* Wait queue to trigger commit */ wait_queue_head_t j_wait_commit; - + /* Wait queue to wait for updates to complete */ wait_queue_head_t j_wait_updates; /* Semaphore for locking against concurrent checkpoints */ - struct semaphore j_checkpoint_sem; + struct semaphore j_checkpoint_sem; /* The main journal lock, used by lock_journal() */ struct semaphore j_sem; - + /* Journal head: identifies the first unused block in the journal. */ unsigned long j_head; - + /* Journal tail: identifies the oldest still-used block in the * journal. */ unsigned long j_tail; @@ -546,12 +546,12 @@ struct journal_s struct list_head j_all_journals; /* The revoke table: maintains the list of revoked blocks in the - current transaction. */ + current transaction. */ struct jbd_revoke_table_s *j_revoke; }; -/* - * Journal flag definitions +/* + * Journal flag definitions */ #define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */ #define JFS_ABORT 0x002 /* Journaling has been aborted for errors. */ @@ -559,7 +559,7 @@ struct journal_s #define JFS_FLUSHED 0x008 /* The journal superblock has been flushed */ #define JFS_LOADED 0x010 /* The journal superblock has been loaded */ -/* +/* * Function declarations for the journaling transaction and buffer * management */ @@ -589,7 +589,7 @@ extern void journal_insert_checkpoint(struct journal_head *, transaction_t *); extern void __journal_insert_checkpoint(struct journal_head *,transaction_t *); /* Buffer IO */ -extern int +extern int journal_write_metadata_buffer(transaction_t *transaction, struct journal_head *jh_in, struct journal_head **jh_out, @@ -603,7 +603,7 @@ extern void __wait_on_journal (journal_t *); * * We need to lock the journal during transaction state changes so that * nobody ever tries to take a handle on the running transaction while - * we are in the middle of moving it to the commit phase. + * we are in the middle of moving it to the commit phase. * * Note that the locking is completely interrupt unsafe. We never touch * journal structures from interrupts. @@ -637,7 +637,7 @@ static inline handle_t *journal_current_handle(void) /* The journaling code user interface: * * Create and destroy handles - * Register buffer modifications against the current transaction. + * Register buffer modifications against the current transaction. */ extern handle_t *journal_start(journal_t *, int nblocks); @@ -665,11 +665,11 @@ extern journal_t * journal_init_dev(kdev_t dev, kdev_t fs_dev, int start, int len, int bsize); extern journal_t * journal_init_inode (struct inode *); extern int journal_update_format (journal_t *); -extern int journal_check_used_features +extern int journal_check_used_features (journal_t *, unsigned long, unsigned long, unsigned long); -extern int journal_check_available_features +extern int journal_check_available_features (journal_t *, unsigned long, unsigned long, unsigned long); -extern int journal_set_features +extern int journal_set_features (journal_t *, unsigned long, unsigned long, unsigned long); extern int journal_create (journal_t *); extern int journal_load (journal_t *journal); @@ -747,7 +747,7 @@ do { \ * bit, when set, indicates that we have had a fatal error somewhere, * either inside the journaling layer or indicated to us by the client * (eg. ext3), and that we and should not commit any further - * transactions. + * transactions. */ static inline int is_journal_aborted(journal_t *journal) @@ -770,7 +770,7 @@ static inline void journal_abort_handle(handle_t *handle) /* Not all architectures define BUG() */ #ifndef BUG #define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ * ((char *) 0) = 0; \ } while (0) #endif /* BUG */ @@ -826,7 +826,7 @@ extern int journal_blocks_per_page(struct inode *inode); #define BJ_LogCtl 7 /* Buffer contains log descriptors */ #define BJ_Reserved 8 /* Buffer is reserved for access by journal */ #define BJ_Types 9 - + extern int jbd_blocks_per_page(struct inode *inode); #ifdef __KERNEL__ |