Rename symbols in JBD2
Subsystems (2)
PATCH 4/5 Rename symbols in JBD2
Rename functions in JBD2 properly to make it compile with JBD:
All exported symbols (mostly journal_xxx) are changed to jbd2_journal_xxx
All JFS_xxx are changed to JBD2_xxx
All global memory cache(revoke_record_cache, revoke_record_table,jounral_head) are renamed to jbd2_revoke_record_cache/table/journal_head etc. kjournald is rename to kjournald
With these changes the system is happy with both JBD and JBD2 being loaded as module or build in kernel, and tests runs fine. It would be nice in the later to go through the rest jbd2 code and rename them to jbd2_ functions properly.
---
linux-2.6.18-rc4-ming/fs/jbd2/checkpoint.c | 48 +-- linux-2.6.18-rc4-ming/fs/jbd2/commit.c | 116 +++---- linux-2.6.18-rc4-ming/fs/jbd2/journal.c | 424 ++++++++++++++-------------- linux-2.6.18-rc4-ming/fs/jbd2/recovery.c | 50 +-- linux-2.6.18-rc4-ming/fs/jbd2/revoke.c | 144 ++++----- linux-2.6.18-rc4-ming/fs/jbd2/transaction.c | 234 +++++++-------- linux-2.6.18-rc4-ming/include/linux/jbd2.h | 246 ++++++++-------- 7 files changed, 631 insertions(+), 631 deletions(-)
fs/jbd2/journal.c renamed from fs/jbd2/journal.c~jbd2-rename-funcs +212 -212
@@ -40,47 +40,47 @@#include <asm/uaccess.h> #include <asm/page.h> -EXPORT_SYMBOL (journal_start); -EXPORT_SYMBOL (journal_restart); -EXPORT_SYMBOL (journal_extend); -EXPORT_SYMBOL (journal_stop); -EXPORT_SYMBOL (journal_lock_updates); -EXPORT_SYMBOL (journal_unlock_updates); -EXPORT_SYMBOL (journal_get_write_access); -EXPORT_SYMBOL (journal_get_create_access); -EXPORT_SYMBOL (journal_get_undo_access); -EXPORT_SYMBOL (journal_dirty_data); -EXPORT_SYMBOL (journal_dirty_metadata); -EXPORT_SYMBOL (journal_release_buffer); -EXPORT_SYMBOL (journal_forget); +EXPORT_SYMBOL (jbd2_journal_start); +EXPORT_SYMBOL (jbd2_journal_restart); +EXPORT_SYMBOL (jbd2_journal_extend); +EXPORT_SYMBOL (jbd2_journal_stop); +EXPORT_SYMBOL (jbd2_journal_lock_updates); +EXPORT_SYMBOL (jbd2_journal_unlock_updates); +EXPORT_SYMBOL (jbd2_journal_get_write_access); +EXPORT_SYMBOL (jbd2_journal_get_create_access); +EXPORT_SYMBOL (jbd2_journal_get_undo_access); +EXPORT_SYMBOL (jbd2_journal_dirty_data); +EXPORT_SYMBOL (jbd2_journal_dirty_metadata); +EXPORT_SYMBOL (jbd2_journal_release_buffer); +EXPORT_SYMBOL (jbd2_journal_forget);#if 0 EXPORT_SYMBOL (journal_sync_buffer);#endif -EXPORT_SYMBOL (journal_flush); -EXPORT_SYMBOL (journal_revoke); +EXPORT_SYMBOL (jbd2_journal_flush); +EXPORT_SYMBOL (jbd2_journal_revoke); -EXPORT_SYMBOL (journal_init_dev); -EXPORT_SYMBOL (journal_init_inode); -EXPORT_SYMBOL (journal_update_format); -EXPORT_SYMBOL (journal_check_used_features); -EXPORT_SYMBOL (journal_check_available_features); -EXPORT_SYMBOL (journal_set_features); -EXPORT_SYMBOL (journal_create); -EXPORT_SYMBOL (journal_load); -EXPORT_SYMBOL (journal_destroy); -EXPORT_SYMBOL (journal_update_superblock); -EXPORT_SYMBOL (journal_abort); -EXPORT_SYMBOL (journal_errno); -EXPORT_SYMBOL (journal_ack_err); -EXPORT_SYMBOL (journal_clear_err); -EXPORT_SYMBOL (log_wait_commit); -EXPORT_SYMBOL (journal_start_commit); -EXPORT_SYMBOL (journal_force_commit_nested); -EXPORT_SYMBOL (journal_wipe); -EXPORT_SYMBOL (journal_blocks_per_page); -EXPORT_SYMBOL (journal_invalidatepage); -EXPORT_SYMBOL (journal_try_to_free_buffers); -EXPORT_SYMBOL (journal_force_commit); +EXPORT_SYMBOL (jbd2_journal_init_dev); +EXPORT_SYMBOL (jbd2_journal_init_inode); +EXPORT_SYMBOL (jbd2_journal_update_format); +EXPORT_SYMBOL (jbd2_journal_check_used_features); +EXPORT_SYMBOL (jbd2_journal_check_available_features); +EXPORT_SYMBOL (jbd2_journal_set_features); +EXPORT_SYMBOL (jbd2_journal_create); +EXPORT_SYMBOL (jbd2_journal_load); +EXPORT_SYMBOL (jbd2_journal_destroy); +EXPORT_SYMBOL (jbd2_journal_update_superblock); +EXPORT_SYMBOL (jbd2_journal_abort); +EXPORT_SYMBOL (jbd2_journal_errno); +EXPORT_SYMBOL (jbd2_journal_ack_err); +EXPORT_SYMBOL (jbd2_journal_clear_err); +EXPORT_SYMBOL (jbd2_log_wait_commit); +EXPORT_SYMBOL (jbd2_journal_start_commit); +EXPORT_SYMBOL (jbd2_journal_force_commit_nested); +EXPORT_SYMBOL (jbd2_journal_wipe); +EXPORT_SYMBOL (jbd2_journal_blocks_per_page); +EXPORT_SYMBOL (jbd2_journal_invalidatepage); +EXPORT_SYMBOL (jbd2_journal_try_to_free_buffers); +EXPORT_SYMBOL (jbd2_journal_force_commit);static int journal_convert_superblock_v1 (journal_t *,journal_superblock_t *);static void __journal_abort_soft (journal_t *journal,int errno);
@@ -97,7 +97,7 @@ static void commit_timeout(unsigned long }/* -* kjournald: The main thread function used to manage a logging device +* kjournald2: The main thread function used to manage a logging device * journal. * * This kernel thread is responsible for two things:
@@ -112,7 +112,7 @@ static void commit_timeout(unsigned long* known as checkpointing, and this thread is responsible for that job. */ -static int kjournald (void *arg) +static int kjournald2 (void *arg) {journal_t *journal = arg;transaction_t *transaction;
@@ -128,7 +128,7 @@ static int kjournald(void *arg) journal->j_task = current;wake_up (&journal->j_wait_done_commit); -printk (KERN_INFO "kjournald starting. Commit interval %ld seconds\n" , +printk (KERN_INFO "kjournald2 starting. Commit interval %ld seconds\n" , journal->j_commit_interval /HZ );/*
@@ -137,7 +137,7 @@ static int kjournald(void *arg)spin_lock (&journal->j_state_lock); loop: -if (journal->j_flags &JFS_UNMOUNT ) +if (journal->j_flags &JBD2_UNMOUNT ) goto end_loop; jbd_debug(1, "commit_sequence=%d, commit_request=%d\n",
@@ -147,7 +147,7 @@ loop:jbd_debug (1 ,"OK, requests differ\n" );spin_unlock (&journal->j_state_lock);del_timer_sync (&journal->j_commit_timer); -journal_commit_transaction (journal); +jbd2_journal_commit_transaction (journal);spin_lock (&journal->j_state_lock); goto loop; }
@@ -159,7 +159,7 @@ loop:* good idea, because that depends on threads that may * be already stopped. */ -jbd_debug (1 ,"Now suspending kjournald\n" ); +jbd_debug (1 ,"Now suspending kjournald2\n" );spin_unlock (&journal->j_state_lock);refrigerator ();spin_lock (&journal->j_state_lock);
@@ -179,7 +179,7 @@ loop:if (transaction &&time_after_eq (jiffies, transaction->t_expires)) should_sleep =0 ; -if (journal->j_flags &JFS_UNMOUNT ) +if (journal->j_flags &JBD2_UNMOUNT ) should_sleep =0 ;if (should_sleep) {spin_unlock (&journal->j_state_lock);
@@ -189,7 +189,7 @@ loop:finish_wait (&journal->j_wait_commit, &wait); } -jbd_debug (1 ,"kjournald wakes\n" ); +jbd_debug (1 ,"kjournald2 wakes\n" );/* * Were we woken up by a commit wakeup event?
@@ -210,16 +210,16 @@ end_loop:return 0 ; } -static void journal_start_thread (journal_t *journal) +static void jbd2_journal_start_thread (journal_t *journal) { -kthread_run (kjournald, journal,"kjournald" ); +kthread_run (kjournald2, journal,"kjournald2" );wait_event (journal->j_wait_done_commit, journal->j_task !=0 ); }static void journal_kill_thread (journal_t *journal) {spin_lock (&journal->j_state_lock); - journal->j_flags |=JFS_UNMOUNT ; + journal->j_flags |=JBD2_UNMOUNT ;while (journal->j_task) {wake_up (&journal->j_wait_commit);
@@ -231,7 +231,7 @@ static void journal_kill_thread(journal_ }/* -* journal_write_metadata_buffer: write a metadata buffer to the journal. +* jbd2_journal_write_metadata_buffer: write a metadata buffer to the journal. * * Writes a metadata buffer to a given disk block. The actual IO is not * performed but a new buffer_head is constructed which labels the data
@@ -239,7 +239,7 @@ static void journal_kill_thread(journal_* * Any magic-number escaping which needs to be done will cause a * copy-out here. If the buffer happens to start with the -* JFS_MAGIC_NUMBER, then we can't write it to the log directly: the +* JBD2_MAGIC_NUMBER, then we can't write it to the log directly: the * magic number is only written to the log for descripter blocks. In * this case, we copy the data and replace the first word with 0, and we * return a result code which indicates that this buffer needs to be
@@ -267,7 +267,7 @@ static void journal_kill_thread(journal_* Bit 1 set == buffer copy-out performed (kfree the data after IO) */ -int journal_write_metadata_buffer (transaction_t *transaction, +int jbd2_journal_write_metadata_buffer (transaction_t *transaction,struct journal_head *jh_in,struct journal_head **jh_out,int blocknr)
@@ -315,7 +315,7 @@ repeat:* Check for escaping */ if (*((__be32 *)(mapped_data + new_offset)) == -cpu_to_be32 (JFS_MAGIC_NUMBER )) { +cpu_to_be32 (JBD2_MAGIC_NUMBER )) { need_copy_out =1 ; do_escape =1 ; }
@@ -361,7 +361,7 @@ repeat:atomic_set (&new_bh->b_count,1 );jbd_unlock_bh_state (bh_in); - new_jh =journal_add_journal_head (new_bh);/* This sleeps */ + new_jh =jbd2_journal_add_journal_head (new_bh);/* This sleeps */ set_bh_page (new_bh, new_page, new_offset); new_jh->b_transaction =NULL ;
@@ -379,9 +379,9 @@ repeat:* copying is moved to the transaction's shadow queue. */ JBUFFER_TRACE (jh_in,"file as BJ_Shadow" ); -journal_file_buffer (jh_in, transaction, BJ_Shadow); +jbd2_journal_file_buffer (jh_in, transaction, BJ_Shadow);JBUFFER_TRACE (new_jh,"file as BJ_IO" ); -journal_file_buffer (new_jh, transaction,BJ_IO ); +jbd2_journal_file_buffer (new_jh, transaction,BJ_IO );return do_escape | (done_copy_out <<1 ); }
@@ -392,14 +392,14 @@ repeat:*/ /* -* __log_space_left: Return the number of free blocks left in the journal. +* __jbd2_log_space_left: Return the number of free blocks left in the journal. * * Called with the journal already locked. * * Called under j_state_lock */ -int __log_space_left (journal_t *journal) +int __jbd2_log_space_left (journal_t *journal) {int left = journal->j_free;
@@ -423,7 +423,7 @@ int __log_space_left(journal_t *journal)/* * Called under j_state_lock. Returns true if a transaction was started. */ -int __log_start_commit (journal_t *journal,tid_t target) +int __jbd2_log_start_commit (journal_t *journal,tid_t target) {/* * Are we already doing a recent enough commit?
@@ -444,12 +444,12 @@ int __log_start_commit(journal_t *journareturn 0 ; } -int log_start_commit (journal_t *journal,tid_t tid) +int jbd2_log_start_commit (journal_t *journal,tid_t tid) {int ret;spin_lock (&journal->j_state_lock); - ret =__log_start_commit (journal, tid); + ret =__jbd2_log_start_commit (journal, tid);spin_unlock (&journal->j_state_lock);return ret; }
@@ -464,7 +464,7 @@ int log_start_commit(journal_t *journal,* * Returns true if a transaction was started. */ -int journal_force_commit_nested (journal_t *journal) +int jbd2_journal_force_commit_nested (journal_t *journal) {transaction_t *transaction =NULL ;tid_t tid;
@@ -472,7 +472,7 @@ int journal_force_commit_nested(journal_spin_lock (&journal->j_state_lock);if (journal->j_running_transaction && !current->journal_info) { transaction = journal->j_running_transaction; -__log_start_commit (journal, transaction->t_tid); +__jbd2_log_start_commit (journal, transaction->t_tid); }else if (journal->j_committing_transaction) transaction = journal->j_committing_transaction;
@@ -483,7 +483,7 @@ int journal_force_commit_nested(journal_ tid = transaction->t_tid;spin_unlock (&journal->j_state_lock); -log_wait_commit (journal, tid); +jbd2_log_wait_commit (journal, tid);return 1 ; }
@@ -491,7 +491,7 @@ int journal_force_commit_nested(journal_* Start a commit of the current running transaction (if any). Returns true * if a transaction was started, and fills its tid in at *ptid */ -int journal_start_commit (journal_t *journal,tid_t *ptid) +int jbd2_journal_start_commit (journal_t *journal,tid_t *ptid) {int ret =0 ;
@@ -499,7 +499,7 @@ int journal_start_commit(journal_t *jourif (journal->j_running_transaction) {tid_t tid = journal->j_running_transaction->t_tid; - ret =__log_start_commit (journal, tid); + ret =__jbd2_log_start_commit (journal, tid);if (ret && ptid) *ptid = tid; }else if (journal->j_committing_transaction && ptid) {
@@ -518,7 +518,7 @@ int journal_start_commit(journal_t *jour* Wait for a specified commit to complete. * The caller may not hold the journal lock. */ -int log_wait_commit (journal_t *journal,tid_t tid) +int jbd2_log_wait_commit (journal_t *journal,tid_t tid) {int err =0 ;
@@ -554,7 +554,7 @@ int log_wait_commit(journal_t *journal,* Log buffer allocation routines: */ -int journal_next_log_block (journal_t *journal,unsigned long *retp) +int jbd2_journal_next_log_block (journal_t *journal,unsigned long *retp) {unsigned long blocknr;
@@ -567,7 +567,7 @@ int journal_next_log_block(journal_t *joif (journal->j_head == journal->j_last) journal->j_head = journal->j_first;spin_unlock (&journal->j_state_lock); -return journal_bmap (journal, blocknr, retp); +return jbd2_journal_bmap (journal, blocknr, retp); }/*
@@ -577,7 +577,7 @@ int journal_next_log_block(journal_t *jo* this is a no-op. If needed, we can use j_blk_offset - everything is * ready. */ -int journal_bmap (journal_t *journal,unsigned long blocknr, +int jbd2_journal_bmap (journal_t *journal,unsigned long blocknr,unsigned long *retp) {int err =0 ;
@@ -609,18 +609,18 @@ int journal_bmap(journal_t *journal, uns* the journal without copying their contents, but for journal * descriptor blocks we do need to generate bona fide buffers. * -* After the caller of journal_get_descriptor_buffer() has finished modifying +* After the caller of jbd2_journal_get_descriptor_buffer() has finished modifying * the buffer's contents they really should run flush_dcache_page(bh->b_page). * But we don't bother doing that, so there will be coherency problems with * mmaps of blockdevs which hold live JBD-controlled filesystems. */ -struct journal_head *journal_get_descriptor_buffer (journal_t *journal) +struct journal_head *jbd2_journal_get_descriptor_buffer (journal_t *journal) {struct buffer_head *bh;unsigned long blocknr;int err; - err =journal_next_log_block (journal, &blocknr); + err =jbd2_journal_next_log_block (journal, &blocknr);if (err)return NULL ;
@@ -631,7 +631,7 @@ struct journal_head *journal_get_descripset_buffer_uptodate (bh);unlock_buffer (bh);BUFFER_TRACE (bh,"return this buffer" ); -return journal_add_journal_head (bh); +return jbd2_journal_add_journal_head (bh); }/*
@@ -668,10 +668,10 @@ static journal_t * journal_init_common ( journal->j_commit_interval = (HZ *JBD_DEFAULT_MAX_COMMIT_AGE );/* The journal is marked for error until we succeed with recovery! */ - journal->j_flags =JFS_ABORT ; + journal->j_flags =JBD2_ABORT ;/* Set up a default-sized revoke table for the new mount. */ - err =journal_init_revoke (journal,JOURNAL_REVOKE_DEFAULT_HASH ); + err =jbd2_journal_init_revoke (journal,JOURNAL_REVOKE_DEFAULT_HASH );if (err) {kfree (journal); goto fail;
@@ -681,7 +681,7 @@ fail:return NULL ; } -/* journal_init_dev and journal_init_inode: +/* jbd2_journal_init_dev and jbd2_journal_init_inode: * * Create a journal structure assigned some fixed set of disk blocks to * the journal. We don't actually touch those disk blocks yet, but we
@@ -691,7 +691,7 @@ fail:*/ /** -* journal_t * journal_init_dev() - creates an initialises a journal structure +* journal_t * jbd2_journal_init_dev() - creates an initialises a journal structure * @bdev: Block device on which to create the journal * @fs_dev: Device which hold journalled filesystem for this journal. * @start: Block nr Start of journal.
@@ -699,11 +699,11 @@ fail:* @blocksize: blocksize of journalling device * @returns: a newly created journal_t * * -* journal_init_dev creates a journal which maps a fixed contiguous +* jbd2_journal_init_dev creates a journal which maps a fixed contiguous * range of blocks on an arbitrary block device. * */ -journal_t *journal_init_dev (struct block_device *bdev, +journal_t *jbd2_journal_init_dev (struct block_device *bdev,struct block_device *fs_dev,int start,int len,int blocksize) {
@@ -740,14 +740,14 @@ journal_t * journal_init_dev(struct bloc }/** -* journal_t * journal_init_inode () - creates a journal which maps to a inode. +* journal_t * jbd2_journal_init_inode () - creates a journal which maps to a inode. * @inode: An inode to create the journal in * -* journal_init_inode creates a journal which maps an on-disk inode as +* jbd2_journal_init_inode creates a journal which maps an on-disk inode as * the journal. The inode must exist already, must support bmap() and * must have all data blocks preallocated. */ -journal_t *journal_init_inode (struct inode *inode) +journal_t *jbd2_journal_init_inode (struct inode *inode) {struct buffer_head *bh;journal_t *journal =journal_init_common ();
@@ -780,7 +780,7 @@ journal_t * journal_init_inode (struct ireturn NULL ; } - err =journal_bmap (journal,0 , &blocknr); + err =jbd2_journal_bmap (journal,0 , &blocknr);/* If that failed, give up */ if (err) { printk(KERN_ERR "%s: Cannnot locate journal superblock\n",
@@ -838,27 +838,27 @@ static int journal_reset(journal_t *jour journal->j_max_transaction_buffers = journal->j_maxlen /4 ;/* Add the dynamic fields and write it to disk. */ -journal_update_superblock (journal,1 ); -journal_start_thread (journal); +jbd2_journal_update_superblock (journal,1 ); +jbd2_journal_start_thread (journal);return 0 ; }/** -* int journal_create() - Initialise the new journal file +* int jbd2_journal_create() - Initialise the new journal file * @journal: Journal to create. This structure must have been initialised * * Given a journal_t structure which tells us which disk blocks we can * use, create a new journal superblock and initialise all of the * journal fields from scratch. **/ -int journal_create (journal_t *journal) +int jbd2_journal_create (journal_t *journal) {unsigned long blocknr;struct buffer_head *bh;journal_superblock_t *sb;int i, err; -if (journal->j_maxlen <JFS_MIN_JOURNAL_BLOCKS ) { +if (journal->j_maxlen <JBD2_MIN_JOURNAL_BLOCKS ) {printk (KERN_ERR "Journal length (%d blocks) too short.\n" , journal->j_maxlen);journal_fail_superblock (journal);
@@ -876,10 +876,10 @@ int journal_create(journal_t *journal) }/* Zero out the entire journal on disk. We cannot afford to -have any blocks on disk beginning with JFS_MAGIC_NUMBER. */ +have any blocks on disk beginning with JBD2_MAGIC_NUMBER. */ jbd_debug (1 ,"JBD: Zeroing out journal blocks...\n" );for (i =0 ; i < journal->j_maxlen; i++) { - err =journal_bmap (journal, i, &blocknr); + err =jbd2_journal_bmap (journal, i, &blocknr);if (err)return err; bh =__getblk (journal->j_dev, blocknr, journal->j_blocksize);
@@ -899,8 +899,8 @@ int journal_create(journal_t *journal)/* OK, fill in the initial static fields in the new superblock */ sb = journal->j_superblock; - sb->s_header.h_magic =cpu_to_be32 (JFS_MAGIC_NUMBER ); - sb->s_header.h_blocktype =cpu_to_be32 (JFS_SUPERBLOCK_V2 ); + sb->s_header.h_magic =cpu_to_be32 (JBD2_MAGIC_NUMBER ); + sb->s_header.h_blocktype =cpu_to_be32 (JBD2_SUPERBLOCK_V2 ); sb->s_blocksize =cpu_to_be32 (journal->j_blocksize); sb->s_maxlen =cpu_to_be32 (journal->j_maxlen);
@@ -908,21 +908,21 @@ int journal_create(journal_t *journal) journal->j_transaction_sequence =1 ; - journal->j_flags &= ~JFS_ABORT ; + journal->j_flags &= ~JBD2_ABORT ; journal->j_format_version =2 ;return journal_reset (journal); }/** -* void journal_update_superblock() - Update journal sb on disk. +* void jbd2_journal_update_superblock() - Update journal sb on disk. * @journal: The journal to update. * @wait: Set to '0' if you don't want to wait for IO completion. * * Update a journal's dynamic superblock fields and write it to disk, * optionally waiting for the IO to complete. */ -void journal_update_superblock (journal_t *journal,int wait) +void jbd2_journal_update_superblock (journal_t *journal,int wait) {journal_superblock_t *sb = journal->j_superblock;struct buffer_head *bh = journal->j_sb_buffer;
@@ -931,7 +931,7 @@ void journal_update_superblock(journal_t* As a special case, if the on-disk copy is already marked as needing * no recovery (s_start == 0) and there are no outstanding transactions * in the filesystem, then we can safely defer the superblock update -* until the next commit by setting JFS_FLUSHED. This avoids +* until the next commit by setting JBD2_FLUSHED. This avoids * attempting a write to a potential-readonly device. */ if (sb->s_start == 0 && journal->j_tail_sequence ==
@@ -966,9 +966,9 @@ out:spin_lock (&journal->j_state_lock);if (sb->s_start) - journal->j_flags &= ~JFS_FLUSHED ; + journal->j_flags &= ~JBD2_FLUSHED ;else - journal->j_flags |=JFS_FLUSHED ; + journal->j_flags |=JBD2_FLUSHED ;spin_unlock (&journal->j_state_lock); }
@@ -1000,17 +1000,17 @@ static int journal_get_superblock(journa err = -EINVAL ; -if (sb->s_header.h_magic !=cpu_to_be32 (JFS_MAGIC_NUMBER ) || +if (sb->s_header.h_magic !=cpu_to_be32 (JBD2_MAGIC_NUMBER ) || sb->s_blocksize !=cpu_to_be32 (journal->j_blocksize)) {printk (KERN_WARNING "JBD: no valid journal superblock found\n" ); goto out; }switch (be32_to_cpu (sb->s_header.h_blocktype)) { -case JFS_SUPERBLOCK_V1 : +case JBD2_SUPERBLOCK_V1 : journal->j_format_version =1 ;break ; -case JFS_SUPERBLOCK_V2 : +case JBD2_SUPERBLOCK_V2 : journal->j_format_version =2 ;break ;default :
@@ -1059,14 +1059,14 @@ static int load_superblock(journal_t *jo/** -* int journal_load() - Read journal from disk. +* int jbd2_journal_load() - Read journal from disk. * @journal: Journal to act on. * * Given a journal_t structure which tells us which disk blocks contain * a journal, read the journal from disk to initialise the in-memory * structures. */ -int journal_load (journal_t *journal) +int jbd2_journal_load (journal_t *journal) {int err;
@@ -1081,9 +1081,9 @@ int journal_load(journal_t *journal)journal_superblock_t *sb = journal->j_superblock;if ((sb->s_feature_ro_compat & - ~cpu_to_be32 (JFS_KNOWN_ROCOMPAT_FEATURES )) || + ~cpu_to_be32 (JBD2_KNOWN_ROCOMPAT_FEATURES )) || (sb->s_feature_incompat & - ~cpu_to_be32 (JFS_KNOWN_INCOMPAT_FEATURES ))) { + ~cpu_to_be32 (JBD2_KNOWN_INCOMPAT_FEATURES ))) {printk (KERN_WARNING "JBD: Unrecognised features on journal\n" );return -EINVAL ;
@@ -1092,7 +1092,7 @@ int journal_load(journal_t *journal)/* Let the recovery code check whether it needs to recover any * data from the journal. */ -if (journal_recover (journal)) +if (jbd2_journal_recover (journal)) goto recovery_error;/* OK, we've finished with the dynamic journal bits:
@@ -1101,8 +1101,8 @@ int journal_load(journal_t *journal)if (journal_reset (journal)) goto recovery_error; - journal->j_flags &= ~JFS_ABORT ; - journal->j_flags |=JFS_LOADED ; + journal->j_flags &= ~JBD2_ABORT ; + journal->j_flags |=JBD2_LOADED ;return 0 ; recovery_error:
@@ -1111,20 +1111,20 @@ recovery_error: }/** -* void journal_destroy() - Release a journal_t structure. +* void jbd2_journal_destroy() - Release a journal_t structure. * @journal: Journal to act on. * * Release a journal_t structure once it is no longer in use by the * journaled object. */ -void journal_destroy (journal_t *journal) +void jbd2_journal_destroy (journal_t *journal) {/* Wait for the commit thread to wake up and die. */ journal_kill_thread (journal);/* Force a final log commit */ if (journal->j_running_transaction) -journal_commit_transaction (journal); +jbd2_journal_commit_transaction (journal);/* Force any old transactions to disk */
@@ -1132,7 +1132,7 @@ void journal_destroy(journal_t *journal)spin_lock (&journal->j_list_lock);while (journal->j_checkpoint_transactions !=NULL ) {spin_unlock (&journal->j_list_lock); -log_do_checkpoint (journal); +jbd2_log_do_checkpoint (journal);spin_lock (&journal->j_list_lock); }
@@ -1145,21 +1145,21 @@ void journal_destroy(journal_t *journal) journal->j_tail =0 ; journal->j_tail_sequence = ++journal->j_transaction_sequence;if (journal->j_sb_buffer) { -journal_update_superblock (journal,1 ); +jbd2_journal_update_superblock (journal,1 );brelse (journal->j_sb_buffer); }if (journal->j_inode)iput (journal->j_inode);if (journal->j_revoke) -journal_destroy_revoke (journal); +jbd2_journal_destroy_revoke (journal);kfree (journal->j_wbuf);kfree (journal); }/** -*int journal_check_used_features () - Check if features specified are used. +*int jbd2_journal_check_used_features () - Check if features specified are used. * @journal: Journal to check. * @compat: bitmask of compatible features * @ro: bitmask of features that force read-only mount
@@ -1169,7 +1169,7 @@ void journal_destroy(journal_t *journal)* features. Return true (non-zero) if it does. **/ -int journal_check_used_features (journal_t *journal,unsigned long compat, +int jbd2_journal_check_used_features (journal_t *journal,unsigned long compat,unsigned long ro,unsigned long incompat) {journal_superblock_t *sb;
@@ -1190,7 +1190,7 @@ int journal_check_used_features (journal }/** -* int journal_check_available_features() - Check feature set in journalling layer +* int jbd2_journal_check_available_features() - Check feature set in journalling layer * @journal: Journal to check. * @compat: bitmask of compatible features * @ro: bitmask of features that force read-only mount
@@ -1200,7 +1200,7 @@ int journal_check_used_features (journal* all of a given set of features on this journal. Return true * (non-zero) if it can. */ -int journal_check_available_features (journal_t *journal,unsigned long compat, +int jbd2_journal_check_available_features (journal_t *journal,unsigned long compat,unsigned long ro,unsigned long incompat) {journal_superblock_t *sb;
@@ -1217,16 +1217,16 @@ int journal_check_available_features (joif (journal->j_format_version !=2 )return 0 ; -if ((compat &JFS_KNOWN_COMPAT_FEATURES ) == compat && - (ro &JFS_KNOWN_ROCOMPAT_FEATURES ) == ro && - (incompat &JFS_KNOWN_INCOMPAT_FEATURES ) == incompat) +if ((compat &JBD2_KNOWN_COMPAT_FEATURES ) == compat && + (ro &JBD2_KNOWN_ROCOMPAT_FEATURES ) == ro && + (incompat &JBD2_KNOWN_INCOMPAT_FEATURES ) == incompat)return 1 ;return 0 ; }/** -* int journal_set_features () - Mark a given journal feature in the superblock +* int jbd2_journal_set_features () - Mark a given journal feature in the superblock * @journal: Journal to act on. * @compat: bitmask of compatible features * @ro: bitmask of features that force read-only mount
@@ -1237,15 +1237,15 @@ int journal_check_available_features (jo* */ -int journal_set_features (journal_t *journal,unsigned long compat, +int jbd2_journal_set_features (journal_t *journal,unsigned long compat,unsigned long ro,unsigned long incompat) {journal_superblock_t *sb; -if (journal_check_used_features (journal, compat, ro, incompat)) +if (jbd2_journal_check_used_features (journal, compat, ro, incompat))return 1 ; -if (!journal_check_available_features (journal, compat, ro, incompat)) +if (!jbd2_journal_check_available_features (journal, compat, ro, incompat))return 0 ; jbd_debug(1, "Setting new features 0x%lx/0x%lx/0x%lx\n",
@@ -1262,13 +1262,13 @@ int journal_set_features (journal_t *jou/** -* int journal_update_format () - Update on-disk journal structure. +* int jbd2_journal_update_format () - Update on-disk journal structure. * @journal: Journal to act on. * * Given an initialised but unloaded journal struct, poke about in the * on-disk structure to update it to the most recent supported version. */ -int journal_update_format (journal_t *journal) +int jbd2_journal_update_format (journal_t *journal) {journal_superblock_t *sb;int err;
@@ -1280,9 +1280,9 @@ int journal_update_format (journal_t *jo sb = journal->j_superblock;switch (be32_to_cpu (sb->s_header.h_blocktype)) { -case JFS_SUPERBLOCK_V2 : +case JBD2_SUPERBLOCK_V2 :return 0 ; -case JFS_SUPERBLOCK_V1 : +case JBD2_SUPERBLOCK_V1 :return journal_convert_superblock_v1 (journal, sb);default :break ;
@@ -1305,7 +1305,7 @@ static int journal_convert_superblock_v1memset (&sb->s_feature_compat,0 , blocksize-offset); sb->s_nr_users =cpu_to_be32 (1 ); - sb->s_header.h_blocktype =cpu_to_be32 (JFS_SUPERBLOCK_V2 ); + sb->s_header.h_blocktype =cpu_to_be32 (JBD2_SUPERBLOCK_V2 ); journal->j_format_version =2 ; bh = journal->j_sb_buffer;
@@ -1317,7 +1317,7 @@ static int journal_convert_superblock_v1/** -* int journal_flush () - Flush journal +* int jbd2_journal_flush () - Flush journal * @journal: Journal to act on. * * Flush all data for a given journal to disk and empty the journal.
@@ -1325,7 +1325,7 @@ static int journal_convert_superblock_v1* recovery does not need to happen on remount. */ -int journal_flush (journal_t *journal) +int jbd2_journal_flush (journal_t *journal) {int err =0 ;transaction_t *transaction =NULL ;
@@ -1336,7 +1336,7 @@ int journal_flush(journal_t *journal)/* Force everything buffered to the log... */ if (journal->j_running_transaction) { transaction = journal->j_running_transaction; -__log_start_commit (journal, transaction->t_tid); +__jbd2_log_start_commit (journal, transaction->t_tid); }else if (journal->j_committing_transaction) transaction = journal->j_committing_transaction;
@@ -1345,7 +1345,7 @@ int journal_flush(journal_t *journal)tid_t tid = transaction->t_tid;spin_unlock (&journal->j_state_lock); -log_wait_commit (journal, tid); +jbd2_log_wait_commit (journal, tid); }else {spin_unlock (&journal->j_state_lock); }
@@ -1354,11 +1354,11 @@ int journal_flush(journal_t *journal)spin_lock (&journal->j_list_lock);while (!err && journal->j_checkpoint_transactions !=NULL ) {spin_unlock (&journal->j_list_lock); - err =log_do_checkpoint (journal); + err =jbd2_log_do_checkpoint (journal);spin_lock (&journal->j_list_lock); }spin_unlock (&journal->j_list_lock); -cleanup_journal_tail (journal); +jbd2_cleanup_journal_tail (journal);/* Finally, mark the journal as really needing no recovery. * This sets s_start==0 in the underlying superblock, which is
@@ -1369,7 +1369,7 @@ int journal_flush(journal_t *journal) old_tail = journal->j_tail; journal->j_tail =0 ;spin_unlock (&journal->j_state_lock); -journal_update_superblock (journal,1 ); +jbd2_journal_update_superblock (journal,1 );spin_lock (&journal->j_state_lock); journal->j_tail = old_tail;
@@ -1383,24 +1383,24 @@ int journal_flush(journal_t *journal) }/** -* int journal_wipe() - Wipe journal contents +* int jbd2_journal_wipe() - Wipe journal contents * @journal: Journal to act on. * @write: flag (see below) * * Wipe out all of the contents of a journal, safely. This will produce * a warning if the journal contains any valid recovery information. -* Must be called between journal_init_*() and journal_load(). +* Must be called between journal_init_*() and jbd2_journal_load(). * * If 'write' is non-zero, then we wipe out the journal on disk; otherwise * we merely suppress recovery. */ -int journal_wipe (journal_t *journal,int write) +int jbd2_journal_wipe (journal_t *journal,int write) {journal_superblock_t *sb;int err =0 ; -J_ASSERT (!(journal->j_flags &JFS_LOADED )); +J_ASSERT (!(journal->j_flags &JBD2_LOADED )); err =load_superblock (journal);if (err)
@@ -1414,9 +1414,9 @@ int journal_wipe(journal_t *journal, intprintk (KERN_WARNING "JBD: %s recovery information on journal\n" , write ?"Clearing" :"Ignoring" ); - err =journal_skip_recovery (journal); + err =jbd2_journal_skip_recovery (journal);if (write) -journal_update_superblock (journal,1 ); +jbd2_journal_update_superblock (journal,1 ); no_recovery:return err;
@@ -1452,22 +1452,22 @@ static const char *journal_dev_name(jour* Aborts hard --- we mark the abort as occurred, but do _nothing_ else, * and don't attempt to make any other journal updates. */ -void __journal_abort_hard (journal_t *journal) +void __jbd2_journal_abort_hard (journal_t *journal) {transaction_t *transaction;char b[BDEVNAME_SIZE ]; -if (journal->j_flags &JFS_ABORT ) +if (journal->j_flags &JBD2_ABORT )return ;printk (KERN_ERR "Aborting journal on device %s.\n" ,journal_dev_name (journal, b));spin_lock (&journal->j_state_lock); - journal->j_flags |=JFS_ABORT ; + journal->j_flags |=JBD2_ABORT ; transaction = journal->j_running_transaction;if (transaction) -__log_start_commit (journal, transaction->t_tid); +__jbd2_log_start_commit (journal, transaction->t_tid);spin_unlock (&journal->j_state_lock); }
@@ -1475,20 +1475,20 @@ void __journal_abort_hard(journal_t *jou* but don't do any other IO. */ static void __journal_abort_soft (journal_t *journal,int errno) { -if (journal->j_flags &JFS_ABORT ) +if (journal->j_flags &JBD2_ABORT )return ;if (!journal->j_errno) journal->j_errno = errno; -__journal_abort_hard (journal); +__jbd2_journal_abort_hard (journal);if (errno) -journal_update_superblock (journal,1 ); +jbd2_journal_update_superblock (journal,1 ); }/** -* void journal_abort () - Shutdown the journal immediately. +* void jbd2_journal_abort () - Shutdown the journal immediately. * @journal: the journal to shutdown. * @errno: an error number to record in the journal indicating * the reason for the shutdown.
@@ -1497,7 +1497,7 @@ static void __journal_abort_soft (journa* journal (not of a single transaction). This operation cannot be * undone without closing and reopening the journal. * -* The journal_abort function is intended to support higher level error +* The jbd2_journal_abort function is intended to support higher level error * recovery mechanisms such as the ext2/ext3 remount-readonly error * mode. *
@@ -1513,13 +1513,13 @@ static void __journal_abort_soft (journa* * Any attempt to get a new transaction handle on a journal which is in * ABORT state will just result in an -EROFS error return. A -* journal_stop on an existing handle will return -EIO if we have +* jbd2_journal_stop on an existing handle will return -EIO if we have * entered abort state during the update. * * Recursive transactions are not disturbed by journal abort until the -* final journal_stop, which will receive the -EIO error. +* final jbd2_journal_stop, which will receive the -EIO error. * -* Finally, the journal_abort call allows the caller to supply an errno +* Finally, the jbd2_journal_abort call allows the caller to supply an errno * which will be recorded (if possible) in the journal superblock. This * allows a client to record failure conditions in the middle of a * transaction without having to complete the transaction to record the
@@ -1533,28 +1533,28 @@ static void __journal_abort_soft (journa* */ -void journal_abort (journal_t *journal,int errno) +void jbd2_journal_abort (journal_t *journal,int errno) {__journal_abort_soft (journal, errno); }/** -* int journal_errno () - returns the journal's error state. +* int jbd2_journal_errno () - returns the journal's error state. * @journal: journal to examine. * -* This is the errno numbet set with journal_abort(), the last +* This is the errno numbet set with jbd2_journal_abort(), the last * time the journal was mounted - if the journal was stopped * without calling abort this will be 0. * * If the journal has been aborted on this mount time -EROFS will * be returned. */ -int journal_errno (journal_t *journal) +int jbd2_journal_errno (journal_t *journal) {int err;spin_lock (&journal->j_state_lock); -if (journal->j_flags &JFS_ABORT ) +if (journal->j_flags &JBD2_ABORT ) err = -EROFS ;else err = journal->j_errno;
@@ -1563,18 +1563,18 @@ int journal_errno(journal_t *journal) }/** -* int journal_clear_err () - clears the journal's error state +* int jbd2_journal_clear_err () - clears the journal's error state * @journal: journal to act on. * * An error must be cleared or Acked to take a FS out of readonly * mode. */ -int journal_clear_err (journal_t *journal) +int jbd2_journal_clear_err (journal_t *journal) {int err =0 ;spin_lock (&journal->j_state_lock); -if (journal->j_flags &JFS_ABORT ) +if (journal->j_flags &JBD2_ABORT ) err = -EROFS ;else journal->j_errno =0 ;
@@ -1583,21 +1583,21 @@ int journal_clear_err(journal_t *journal }/** -* void journal_ack_err() - Ack journal err. +* void jbd2_journal_ack_err() - Ack journal err. * @journal: journal to act on. * * An error must be cleared or Acked to take a FS out of readonly * mode. */ -void journal_ack_err (journal_t *journal) +void jbd2_journal_ack_err (journal_t *journal) {spin_lock (&journal->j_state_lock);if (journal->j_errno) - journal->j_flags |=JFS_ACK_ERR ; + journal->j_flags |=JBD2_ACK_ERR ;spin_unlock (&journal->j_state_lock); } -int journal_blocks_per_page (struct inode *inode) +int jbd2_journal_blocks_per_page (struct inode *inode) {return 1 << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits); }
@@ -1606,7 +1606,7 @@ int journal_blocks_per_page(struct inode* Simple support for retrying memory allocations. Introduced to help to * debug different VM deadlock avoidance strategies. */ -void *__jbd_kmalloc (const char *where,size_t size,gfp_t flags,int retry) +void *__jbd2_kmalloc (const char *where,size_t size,gfp_t flags,int retry) {return kmalloc (size, flags | (retry ? __GFP_NOFAIL :0 )); }
@@ -1614,35 +1614,35 @@ void * __jbd_kmalloc (const char *where,/* * Journal_head storage management */ -static kmem_cache_t *journal_head_cache; +static kmem_cache_t *jbd2_journal_head_cache;#ifdef CONFIG_JBD_DEBUG static atomic_t nr_journal_heads =ATOMIC_INIT (0 );#endif -static int journal_init_journal_head_cache (void ) +static int journal_init_jbd2_journal_head_cache (void ) {int retval; -J_ASSERT (journal_head_cache ==0 ); - journal_head_cache =kmem_cache_create ("journal_head" , +J_ASSERT (jbd2_journal_head_cache ==0 ); + jbd2_journal_head_cache =kmem_cache_create ("jbd2_journal_head" ,sizeof (struct journal_head ),0 ,/* offset */ 0 ,/* flags */ NULL ,/* ctor */ NULL );/* dtor */ retval =0 ; -if (journal_head_cache ==0 ) { +if (jbd2_journal_head_cache ==0 ) { retval = -ENOMEM ;printk (KERN_EMERG "JBD: no memory for journal_head cache\n" ); }return retval; } -static void journal_destroy_journal_head_cache (void ) +static void jbd2_journal_destroy_jbd2_journal_head_cache (void ) { -J_ASSERT (journal_head_cache !=NULL ); -kmem_cache_destroy (journal_head_cache); - journal_head_cache =NULL ; +J_ASSERT (jbd2_journal_head_cache !=NULL ); +kmem_cache_destroy (jbd2_journal_head_cache); + jbd2_journal_head_cache =NULL ; }/*
@@ -1656,7 +1656,7 @@ static struct journal_head *journal_allo#ifdef CONFIG_JBD_DEBUG atomic_inc (&nr_journal_heads);#endif - ret =kmem_cache_alloc (journal_head_cache,GFP_NOFS ); + ret =kmem_cache_alloc (jbd2_journal_head_cache,GFP_NOFS );if (ret ==0 ) {jbd_debug (1 ,"out of memory for journal_head\n" );if (time_after (jiffies, last_warning +5 *HZ )) {
@@ -1666,7 +1666,7 @@ static struct journal_head *journal_allo }while (ret ==0 ) {yield (); - ret =kmem_cache_alloc (journal_head_cache,GFP_NOFS ); + ret =kmem_cache_alloc (jbd2_journal_head_cache,GFP_NOFS ); } }return ret;
@@ -1678,7 +1678,7 @@ static void journal_free_journal_head(statomic_dec (&nr_journal_heads);memset (jh,JBD_POISON_FREE ,sizeof (*jh));#endif -kmem_cache_free (journal_head_cache, jh); +kmem_cache_free (jbd2_journal_head_cache, jh); }/*
@@ -1697,22 +1697,22 @@ static void journal_free_journal_head(st* * A journal_head may be detached from its buffer_head when the journal_head's * b_transaction, b_cp_transaction and b_next_transaction pointers are NULL. -* Various places in JBD call journal_remove_journal_head() to indicate that the +* Various places in JBD call jbd2_journal_remove_journal_head() to indicate that the * journal_head can be dropped if needed. * * Various places in the kernel want to attach a journal_head to a buffer_head * _before_ attaching the journal_head to a transaction. To protect the -* journal_head in this situation, journal_add_journal_head elevates the +* journal_head in this situation, jbd2_journal_add_journal_head elevates the * journal_head's b_jcount refcount by one. The caller must call -* journal_put_journal_head() to undo this. +* jbd2_journal_put_journal_head() to undo this. * * So the typical usage would be: * * (Attach a journal_head if needed. Increments b_jcount) -* struct journal_head *jh = journal_add_journal_head(bh); +* struct journal_head *jh = jbd2_journal_add_journal_head(bh); * ... * jh->b_transaction = xxx; -* journal_put_journal_head(jh); +* jbd2_journal_put_journal_head(jh); * * Now, the journal_head's b_jcount is zero, but it is safe from being released * because it has a non-zero b_transaction.
@@ -1724,7 +1724,7 @@ static void journal_free_journal_head(st* Doesn't need the journal lock. * May sleep. */ -struct journal_head *journal_add_journal_head (struct buffer_head *bh) +struct journal_head *jbd2_journal_add_journal_head (struct buffer_head *bh) {struct journal_head *jh;struct journal_head *new_jh =NULL ;
@@ -1767,7 +1767,7 @@ repeat:* Grab a ref against this buffer_head's journal_head. If it ended up not * having a journal_head, return NULL */ -struct journal_head *journal_grab_journal_head (struct buffer_head *bh) +struct journal_head *jbd2_journal_grab_journal_head (struct buffer_head *bh) {struct journal_head *jh =NULL ;
@@ -1819,7 +1819,7 @@ static void __journal_remove_journal_hea }/* -* journal_remove_journal_head(): if the buffer isn't attached to a transaction +* jbd2_journal_remove_journal_head(): if the buffer isn't attached to a transaction * and has a zero b_jcount then remove and release its journal_head. If we did * see that the buffer is not used by any transaction we also "logically" * decrement ->b_count.
@@ -1827,11 +1827,11 @@ static void __journal_remove_journal_hea* We in fact take an additional increment on ->b_count as a convenience, * because the caller usually wants to do additional things with the bh * after calling here. -* The caller of journal_remove_journal_head() *must* run __brelse(bh) at some +* The caller of jbd2_journal_remove_journal_head() *must* run __brelse(bh) at some * time. Once the caller has run __brelse(), the buffer is eligible for * reaping by try_to_free_buffers(). */ -void journal_remove_journal_head (struct buffer_head *bh) +void jbd2_journal_remove_journal_head (struct buffer_head *bh) {jbd_lock_bh_journal_head (bh);__journal_remove_journal_head (bh);
@@ -1842,7 +1842,7 @@ void journal_remove_journal_head(struct* Drop a reference on the passed journal_head. If it fell to zero then try to * release the journal_head from the buffer_head. */ -void journal_put_journal_head (struct journal_head *jh) +void jbd2_journal_put_journal_head (struct journal_head *jh) {struct buffer_head *bh =jh2bh (jh);
@@ -1860,8 +1860,8 @@ void journal_put_journal_head(struct jou* /proc tunables */ #if defined(CONFIG_JBD_DEBUG ) -int journal_enable_debug; -EXPORT_SYMBOL (journal_enable_debug); +int jbd2_journal_enable_debug; +EXPORT_SYMBOL (jbd2_journal_enable_debug);#endif #if defined(CONFIG_JBD_DEBUG ) && defined(CONFIG_PROC_FS )
@@ -1873,7 +1873,7 @@ static int read_jbd_debug(char *page, ch {int ret; - ret =sprintf (page + off,"%d\n" , journal_enable_debug); + ret =sprintf (page + off,"%d\n" , jbd2_journal_enable_debug); *eof =1 ;return ret; }
@@ -1888,7 +1888,7 @@ static int write_jbd_debug(struct file *if (copy_from_user (buf, buffer, count))return -EFAULT ; buf[ARRAY_SIZE (buf) -1 ] ='\0' ; - journal_enable_debug =simple_strtoul (buf,NULL ,10 ); + jbd2_journal_enable_debug =simple_strtoul (buf,NULL ,10 );return count; }
@@ -1904,7 +1904,7 @@ static void __init create_jbd_proc_entry } } -static void __exit remove_jbd_proc_entry(void) +static void __exit jbd2_remove_jbd_proc_entry(void) {if (proc_jbd_debug)remove_proc_entry (JBD_PROC_NAME ,NULL );
@@ -1913,31 +1913,31 @@ static void __exit remove_jbd_proc_entry#else #define create_jbd_proc_entry () do {} while (0) -#define remove_jbd_proc_entry () do {} while (0) +#define jbd2_remove_jbd_proc_entry () do {} while (0)#endif -kmem_cache_t *jbd_handle_cache; +kmem_cache_t *jbd2_handle_cache;static int __init journal_init_handle_cache (void ) { - jbd_handle_cache =kmem_cache_create ("journal_handle" , + jbd2_handle_cache =kmem_cache_create ("jbd2_journal_handle" ,sizeof (handle_t),0 ,/* offset */ 0 ,/* flags */ NULL ,/* ctor */ NULL );/* dtor */ -if (jbd_handle_cache ==NULL ) { +if (jbd2_handle_cache ==NULL ) {printk (KERN_EMERG "JBD: failed to create handle cache\n" );return -ENOMEM ; }return 0 ; } -static void journal_destroy_handle_cache (void ) +static void jbd2_journal_destroy_handle_cache (void ) { -if (jbd_handle_cache) -kmem_cache_destroy (jbd_handle_cache); +if (jbd2_handle_cache) +kmem_cache_destroy (jbd2_handle_cache); }/*
@@ -1948,19 +1948,19 @@ static int __init journal_init_caches(vo {int ret; - ret =journal_init_revoke_caches (); + ret =jbd2_journal_init_revoke_caches ();if (ret ==0 ) - ret =journal_init_journal_head_cache (); + ret =journal_init_jbd2_journal_head_cache ();if (ret ==0 ) ret =journal_init_handle_cache ();return ret; } -static void journal_destroy_caches (void ) +static void jbd2_journal_destroy_caches (void ) { -journal_destroy_revoke_caches (); -journal_destroy_journal_head_cache (); -journal_destroy_handle_cache (); +jbd2_journal_destroy_revoke_caches (); +jbd2_journal_destroy_jbd2_journal_head_cache (); +jbd2_journal_destroy_handle_cache (); }static int __init journal_init (void )
@@ -1977,7 +1977,7 @@ static int __init journal_init(void) ret =journal_init_caches ();if (ret !=0 ) -journal_destroy_caches (); +jbd2_journal_destroy_caches ();create_jbd_proc_entry ();return ret; }
@@ -1989,8 +1989,8 @@ static void __exit journal_exit(void)if (n)printk (KERN_EMERG "JBD: leaked %d journal_heads!\n" , n);#endif -remove_jbd_proc_entry (); -journal_destroy_caches (); +jbd2_remove_jbd_proc_entry (); +jbd2_journal_destroy_caches (); }MODULE_LICENSE ("GPL" );
fs/jbd2/checkpoint.c renamed from fs/jbd2/checkpoint.c~jbd2-rename-funcs +24 -24
163 lines not on this page · raw message
fs/jbd2/commit.c renamed from fs/jbd2/commit.c~jbd2-rename-funcs +58 -58
367 lines not on this page · raw message
fs/jbd2/recovery.c renamed from fs/jbd2/recovery.c~jbd2-rename-funcs +25 -25
176 lines not on this page · raw message
fs/jbd2/revoke.c renamed from fs/jbd2/revoke.c~jbd2-rename-funcs +72 -72
415 lines not on this page · raw message
fs/jbd2/transaction.c renamed from fs/jbd2/transaction.c~jbd2-rename-funcs +117 -117
635 lines not on this page · raw message
include/linux/jbd2.h renamed from include/linux/jbd2.h~jbd2-rename-funcs +123 -123
246 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
_
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Part of the diff is not shown here. View the raw message.