Commit f7f4bccb authored by Mingming Cao's avatar Mingming Cao Committed by Linus Torvalds

[PATCH] jbd2: rename jbd2 symbols to avoid duplication of jbd symbols

Mingming Cao originally did this work, and Shaggy reproduced it using some
scripts from her.
Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 470decc6
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
# Makefile for the linux journaling routines. # Makefile for the linux journaling routines.
# #
obj-$(CONFIG_JBD) += jbd.o obj-$(CONFIG_JBD2) += jbd2.o
jbd-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o jbd2-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <linux/time.h> #include <linux/time.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/jbd.h> #include <linux/jbd2.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -95,9 +95,9 @@ static int __try_to_free_cp_buf(struct journal_head *jh) ...@@ -95,9 +95,9 @@ static int __try_to_free_cp_buf(struct journal_head *jh)
if (jh->b_jlist == BJ_None && !buffer_locked(bh) && !buffer_dirty(bh)) { if (jh->b_jlist == BJ_None && !buffer_locked(bh) && !buffer_dirty(bh)) {
JBUFFER_TRACE(jh, "remove from checkpoint list"); JBUFFER_TRACE(jh, "remove from checkpoint list");
ret = __journal_remove_checkpoint(jh) + 1; ret = __jbd2_journal_remove_checkpoint(jh) + 1;
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
journal_remove_journal_head(bh); jbd2_journal_remove_journal_head(bh);
BUFFER_TRACE(bh, "release"); BUFFER_TRACE(bh, "release");
__brelse(bh); __brelse(bh);
} else { } else {
...@@ -107,19 +107,19 @@ static int __try_to_free_cp_buf(struct journal_head *jh) ...@@ -107,19 +107,19 @@ static int __try_to_free_cp_buf(struct journal_head *jh)
} }
/* /*
* __log_wait_for_space: wait until there is space in the journal. * __jbd2_log_wait_for_space: wait until there is space in the journal.
* *
* Called under j-state_lock *only*. It will be unlocked if we have to wait * Called under j-state_lock *only*. It will be unlocked if we have to wait
* for a checkpoint to free up some space in the log. * for a checkpoint to free up some space in the log.
*/ */
void __log_wait_for_space(journal_t *journal) void __jbd2_log_wait_for_space(journal_t *journal)
{ {
int nblocks; int nblocks;
assert_spin_locked(&journal->j_state_lock); assert_spin_locked(&journal->j_state_lock);
nblocks = jbd_space_needed(journal); nblocks = jbd_space_needed(journal);
while (__log_space_left(journal) < nblocks) { while (__jbd2_log_space_left(journal) < nblocks) {
if (journal->j_flags & JFS_ABORT) if (journal->j_flags & JBD2_ABORT)
return; return;
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
mutex_lock(&journal->j_checkpoint_mutex); mutex_lock(&journal->j_checkpoint_mutex);
...@@ -130,9 +130,9 @@ void __log_wait_for_space(journal_t *journal) ...@@ -130,9 +130,9 @@ void __log_wait_for_space(journal_t *journal)
*/ */
spin_lock(&journal->j_state_lock); spin_lock(&journal->j_state_lock);
nblocks = jbd_space_needed(journal); nblocks = jbd_space_needed(journal);
if (__log_space_left(journal) < nblocks) { if (__jbd2_log_space_left(journal) < nblocks) {
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
log_do_checkpoint(journal); jbd2_log_do_checkpoint(journal);
spin_lock(&journal->j_state_lock); spin_lock(&journal->j_state_lock);
} }
mutex_unlock(&journal->j_checkpoint_mutex); mutex_unlock(&journal->j_checkpoint_mutex);
...@@ -198,9 +198,9 @@ restart: ...@@ -198,9 +198,9 @@ restart:
* Now in whatever state the buffer currently is, we know that * Now in whatever state the buffer currently is, we know that
* it has been written out and so we can drop it from the list * it has been written out and so we can drop it from the list
*/ */
released = __journal_remove_checkpoint(jh); released = __jbd2_journal_remove_checkpoint(jh);
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
journal_remove_journal_head(bh); jbd2_journal_remove_journal_head(bh);
__brelse(bh); __brelse(bh);
} }
} }
...@@ -252,16 +252,16 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, ...@@ -252,16 +252,16 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
spin_unlock(&journal->j_list_lock); spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
log_start_commit(journal, tid); jbd2_log_start_commit(journal, tid);
log_wait_commit(journal, tid); jbd2_log_wait_commit(journal, tid);
ret = 1; ret = 1;
} else if (!buffer_dirty(bh)) { } else if (!buffer_dirty(bh)) {
J_ASSERT_JH(jh, !buffer_jbddirty(bh)); J_ASSERT_JH(jh, !buffer_jbddirty(bh));
BUFFER_TRACE(bh, "remove from checkpoint"); BUFFER_TRACE(bh, "remove from checkpoint");
__journal_remove_checkpoint(jh); __jbd2_journal_remove_checkpoint(jh);
spin_unlock(&journal->j_list_lock); spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
journal_remove_journal_head(bh); jbd2_journal_remove_journal_head(bh);
__brelse(bh); __brelse(bh);
ret = 1; ret = 1;
} else { } else {
...@@ -296,7 +296,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, ...@@ -296,7 +296,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
* *
* The journal should be locked before calling this function. * The journal should be locked before calling this function.
*/ */
int log_do_checkpoint(journal_t *journal) int jbd2_log_do_checkpoint(journal_t *journal)
{ {
transaction_t *transaction; transaction_t *transaction;
tid_t this_tid; tid_t this_tid;
...@@ -309,7 +309,7 @@ int log_do_checkpoint(journal_t *journal) ...@@ -309,7 +309,7 @@ int log_do_checkpoint(journal_t *journal)
* don't need checkpointing, just eliminate them from the * don't need checkpointing, just eliminate them from the
* journal straight away. * journal straight away.
*/ */
result = cleanup_journal_tail(journal); result = jbd2_cleanup_journal_tail(journal);
jbd_debug(1, "cleanup_journal_tail returned %d\n", result); jbd_debug(1, "cleanup_journal_tail returned %d\n", result);
if (result <= 0) if (result <= 0)
return result; return result;
...@@ -374,7 +374,7 @@ restart: ...@@ -374,7 +374,7 @@ restart:
} }
out: out:
spin_unlock(&journal->j_list_lock); spin_unlock(&journal->j_list_lock);
result = cleanup_journal_tail(journal); result = jbd2_cleanup_journal_tail(journal);
if (result < 0) if (result < 0)
return result; return result;
return 0; return 0;
...@@ -397,7 +397,7 @@ out: ...@@ -397,7 +397,7 @@ out:
* we have an abort error outstanding. * we have an abort error outstanding.
*/ */
int cleanup_journal_tail(journal_t *journal) int jbd2_cleanup_journal_tail(journal_t *journal)
{ {
transaction_t * transaction; transaction_t * transaction;
tid_t first_tid; tid_t first_tid;
...@@ -452,8 +452,8 @@ int cleanup_journal_tail(journal_t *journal) ...@@ -452,8 +452,8 @@ int cleanup_journal_tail(journal_t *journal)
journal->j_tail_sequence = first_tid; journal->j_tail_sequence = first_tid;
journal->j_tail = blocknr; journal->j_tail = blocknr;
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
if (!(journal->j_flags & JFS_ABORT)) if (!(journal->j_flags & JBD2_ABORT))
journal_update_superblock(journal, 1); jbd2_journal_update_superblock(journal, 1);
return 0; return 0;
} }
...@@ -518,7 +518,7 @@ static int journal_clean_one_cp_list(struct journal_head *jh, int *released) ...@@ -518,7 +518,7 @@ static int journal_clean_one_cp_list(struct journal_head *jh, int *released)
* Returns number of buffers reaped (for debug) * Returns number of buffers reaped (for debug)
*/ */
int __journal_clean_checkpoint_list(journal_t *journal) int __jbd2_journal_clean_checkpoint_list(journal_t *journal)
{ {
transaction_t *transaction, *last_transaction, *next_transaction; transaction_t *transaction, *last_transaction, *next_transaction;
int ret = 0; int ret = 0;
...@@ -578,7 +578,7 @@ out: ...@@ -578,7 +578,7 @@ out:
* This function is called with jbd_lock_bh_state(jh2bh(jh)) * This function is called with jbd_lock_bh_state(jh2bh(jh))
*/ */
int __journal_remove_checkpoint(struct journal_head *jh) int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
{ {
transaction_t *transaction; transaction_t *transaction;
journal_t *journal; journal_t *journal;
...@@ -607,7 +607,7 @@ int __journal_remove_checkpoint(struct journal_head *jh) ...@@ -607,7 +607,7 @@ int __journal_remove_checkpoint(struct journal_head *jh)
* dropped! * dropped!
* *
* The locking here around j_committing_transaction is a bit sleazy. * The locking here around j_committing_transaction is a bit sleazy.
* See the comment at the end of journal_commit_transaction(). * See the comment at the end of jbd2_journal_commit_transaction().
*/ */
if (transaction == journal->j_committing_transaction) { if (transaction == journal->j_committing_transaction) {
JBUFFER_TRACE(jh, "belongs to committing transaction"); JBUFFER_TRACE(jh, "belongs to committing transaction");
...@@ -617,7 +617,7 @@ int __journal_remove_checkpoint(struct journal_head *jh) ...@@ -617,7 +617,7 @@ int __journal_remove_checkpoint(struct journal_head *jh)
/* OK, that was the last buffer for the transaction: we can now /* OK, that was the last buffer for the transaction: we can now
safely remove this transaction from the log */ safely remove this transaction from the log */
__journal_drop_transaction(journal, transaction); __jbd2_journal_drop_transaction(journal, transaction);
/* Just in case anybody was waiting for more transactions to be /* Just in case anybody was waiting for more transactions to be
checkpointed... */ checkpointed... */
...@@ -636,7 +636,7 @@ out: ...@@ -636,7 +636,7 @@ out:
* Called with the journal locked. * Called with the journal locked.
* Called with j_list_lock held. * Called with j_list_lock held.
*/ */
void __journal_insert_checkpoint(struct journal_head *jh, void __jbd2_journal_insert_checkpoint(struct journal_head *jh,
transaction_t *transaction) transaction_t *transaction)
{ {
JBUFFER_TRACE(jh, "entry"); JBUFFER_TRACE(jh, "entry");
...@@ -666,7 +666,7 @@ void __journal_insert_checkpoint(struct journal_head *jh, ...@@ -666,7 +666,7 @@ void __journal_insert_checkpoint(struct journal_head *jh,
* Called with j_list_lock held. * Called with j_list_lock held.
*/ */
void __journal_drop_transaction(journal_t *journal, transaction_t *transaction) void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transaction)
{ {
assert_spin_locked(&journal->j_list_lock); assert_spin_locked(&journal->j_list_lock);
if (transaction->t_cpnext) { if (transaction->t_cpnext) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#else #else
#include <linux/time.h> #include <linux/time.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/jbd.h> #include <linux/jbd2.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#endif #endif
...@@ -86,7 +86,7 @@ static int do_readahead(journal_t *journal, unsigned int start) ...@@ -86,7 +86,7 @@ static int do_readahead(journal_t *journal, unsigned int start)
nbufs = 0; nbufs = 0;
for (next = start; next < max; next++) { for (next = start; next < max; next++) {
err = journal_bmap(journal, next, &blocknr); err = jbd2_journal_bmap(journal, next, &blocknr);
if (err) { if (err) {
printk (KERN_ERR "JBD: bad block at offset %u\n", printk (KERN_ERR "JBD: bad block at offset %u\n",
...@@ -142,7 +142,7 @@ static int jread(struct buffer_head **bhp, journal_t *journal, ...@@ -142,7 +142,7 @@ static int jread(struct buffer_head **bhp, journal_t *journal,
return -EIO; return -EIO;
} }
err = journal_bmap(journal, offset, &blocknr); err = jbd2_journal_bmap(journal, offset, &blocknr);
if (err) { if (err) {
printk (KERN_ERR "JBD: bad block at offset %u\n", printk (KERN_ERR "JBD: bad block at offset %u\n",
...@@ -191,10 +191,10 @@ static int count_tags(struct buffer_head *bh, int size) ...@@ -191,10 +191,10 @@ static int count_tags(struct buffer_head *bh, int size)
nr++; nr++;
tagp += sizeof(journal_block_tag_t); tagp += sizeof(journal_block_tag_t);
if (!(tag->t_flags & cpu_to_be32(JFS_FLAG_SAME_UUID))) if (!(tag->t_flags & cpu_to_be32(JBD2_FLAG_SAME_UUID)))
tagp += 16; tagp += 16;
if (tag->t_flags & cpu_to_be32(JFS_FLAG_LAST_TAG)) if (tag->t_flags & cpu_to_be32(JBD2_FLAG_LAST_TAG))
break; break;
} }
...@@ -210,7 +210,7 @@ do { \ ...@@ -210,7 +210,7 @@ do { \
} while (0) } while (0)
/** /**
* journal_recover - recovers a on-disk journal * jbd2_journal_recover - recovers a on-disk journal
* @journal: the journal to recover * @journal: the journal to recover
* *
* The primary function for recovering the log contents when mounting a * The primary function for recovering the log contents when mounting a
...@@ -221,7 +221,7 @@ do { \ ...@@ -221,7 +221,7 @@ do { \
* blocks. In the third and final pass, we replay any un-revoked blocks * blocks. In the third and final pass, we replay any un-revoked blocks
* in the log. * in the log.
*/ */
int journal_recover(journal_t *journal) int jbd2_journal_recover(journal_t *journal)
{ {
int err; int err;
journal_superblock_t * sb; journal_superblock_t * sb;
...@@ -260,13 +260,13 @@ int journal_recover(journal_t *journal) ...@@ -260,13 +260,13 @@ int journal_recover(journal_t *journal)
* any existing commit records in the log. */ * any existing commit records in the log. */
journal->j_transaction_sequence = ++info.end_transaction; journal->j_transaction_sequence = ++info.end_transaction;
journal_clear_revoke(journal); jbd2_journal_clear_revoke(journal);
sync_blockdev(journal->j_fs_dev); sync_blockdev(journal->j_fs_dev);
return err; return err;
} }
/** /**
* journal_skip_recovery - Start journal and wipe exiting records * jbd2_journal_skip_recovery - Start journal and wipe exiting records
* @journal: journal to startup * @journal: journal to startup
* *
* Locate any valid recovery information from the journal and set up the * Locate any valid recovery information from the journal and set up the
...@@ -278,7 +278,7 @@ int journal_recover(journal_t *journal) ...@@ -278,7 +278,7 @@ int journal_recover(journal_t *journal)
* much recovery information is being erased, and to let us initialise * much recovery information is being erased, and to let us initialise
* the journal transaction sequence numbers to the next unused ID. * the journal transaction sequence numbers to the next unused ID.
*/ */
int journal_skip_recovery(journal_t *journal) int jbd2_journal_skip_recovery(journal_t *journal)
{ {
int err; int err;
journal_superblock_t * sb; journal_superblock_t * sb;
...@@ -387,7 +387,7 @@ static int do_one_pass(journal_t *journal, ...@@ -387,7 +387,7 @@ static int do_one_pass(journal_t *journal,
tmp = (journal_header_t *)bh->b_data; tmp = (journal_header_t *)bh->b_data;
if (tmp->h_magic != cpu_to_be32(JFS_MAGIC_NUMBER)) { if (tmp->h_magic != cpu_to_be32(JBD2_MAGIC_NUMBER)) {
brelse(bh); brelse(bh);
break; break;
} }
...@@ -407,7 +407,7 @@ static int do_one_pass(journal_t *journal, ...@@ -407,7 +407,7 @@ static int do_one_pass(journal_t *journal,
* to do with it? That depends on the pass... */ * to do with it? That depends on the pass... */
switch(blocktype) { switch(blocktype) {
case JFS_DESCRIPTOR_BLOCK: case JBD2_DESCRIPTOR_BLOCK:
/* If it is a valid descriptor block, replay it /* If it is a valid descriptor block, replay it
* in pass REPLAY; otherwise, just skip over the * in pass REPLAY; otherwise, just skip over the
* blocks it describes. */ * blocks it describes. */
...@@ -451,7 +451,7 @@ static int do_one_pass(journal_t *journal, ...@@ -451,7 +451,7 @@ static int do_one_pass(journal_t *journal,
/* If the block has been /* If the block has been
* revoked, then we're all done * revoked, then we're all done
* here. */ * here. */
if (journal_test_revoke if (jbd2_journal_test_revoke
(journal, blocknr, (journal, blocknr,
next_commit_ID)) { next_commit_ID)) {
brelse(obh); brelse(obh);
...@@ -477,9 +477,9 @@ static int do_one_pass(journal_t *journal, ...@@ -477,9 +477,9 @@ static int do_one_pass(journal_t *journal,
lock_buffer(nbh); lock_buffer(nbh);
memcpy(nbh->b_data, obh->b_data, memcpy(nbh->b_data, obh->b_data,
journal->j_blocksize); journal->j_blocksize);
if (flags & JFS_FLAG_ESCAPE) { if (flags & JBD2_FLAG_ESCAPE) {
*((__be32 *)bh->b_data) = *((__be32 *)bh->b_data) =
cpu_to_be32(JFS_MAGIC_NUMBER); cpu_to_be32(JBD2_MAGIC_NUMBER);
} }
BUFFER_TRACE(nbh, "marking dirty"); BUFFER_TRACE(nbh, "marking dirty");
...@@ -495,17 +495,17 @@ static int do_one_pass(journal_t *journal, ...@@ -495,17 +495,17 @@ static int do_one_pass(journal_t *journal,
skip_write: skip_write:
tagp += sizeof(journal_block_tag_t); tagp += sizeof(journal_block_tag_t);
if (!(flags & JFS_FLAG_SAME_UUID)) if (!(flags & JBD2_FLAG_SAME_UUID))
tagp += 16; tagp += 16;
if (flags & JFS_FLAG_LAST_TAG) if (flags & JBD2_FLAG_LAST_TAG)
break; break;
} }
brelse(bh); brelse(bh);
continue; continue;
case JFS_COMMIT_BLOCK: case JBD2_COMMIT_BLOCK:
/* Found an expected commit block: not much to /* Found an expected commit block: not much to
* do other than move on to the next sequence * do other than move on to the next sequence
* number. */ * number. */
...@@ -513,7 +513,7 @@ static int do_one_pass(journal_t *journal, ...@@ -513,7 +513,7 @@ static int do_one_pass(journal_t *journal,
next_commit_ID++; next_commit_ID++;
continue; continue;
case JFS_REVOKE_BLOCK: case JBD2_REVOKE_BLOCK:
/* If we aren't in the REVOKE pass, then we can /* If we aren't in the REVOKE pass, then we can
* just skip over this block. */ * just skip over this block. */
if (pass != PASS_REVOKE) { if (pass != PASS_REVOKE) {
...@@ -570,11 +570,11 @@ static int do_one_pass(journal_t *journal, ...@@ -570,11 +570,11 @@ static int do_one_pass(journal_t *journal,
static int scan_revoke_records(journal_t *journal, struct buffer_head *bh, static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
tid_t sequence, struct recovery_info *info) tid_t sequence, struct recovery_info *info)
{ {
journal_revoke_header_t *header; jbd2_journal_revoke_header_t *header;
int offset, max; int offset, max;
header = (journal_revoke_header_t *) bh->b_data; header = (jbd2_journal_revoke_header_t *) bh->b_data;
offset = sizeof(journal_revoke_header_t); offset = sizeof(jbd2_journal_revoke_header_t);
max = be32_to_cpu(header->r_count); max = be32_to_cpu(header->r_count);
while (offset < max) { while (offset < max) {
...@@ -583,7 +583,7 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh, ...@@ -583,7 +583,7 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset))); blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset)));
offset += 4; offset += 4;
err = journal_set_revoke(journal, blocknr, sequence); err = jbd2_journal_set_revoke(journal, blocknr, sequence);
if (err) if (err)
return err; return err;
++info->nr_revokes; ++info->nr_revokes;
......
This diff is collapsed.
This diff is collapsed.
/* /*
* linux/include/linux/ext4_jbd.h * linux/include/linux/ext4_jbd2.h
* *
* Written by Stephen C. Tweedie <sct@redhat.com>, 1999 * Written by Stephen C. Tweedie <sct@redhat.com>, 1999
* *
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define _LINUX_EXT4_JBD_H #define _LINUX_EXT4_JBD_H
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/jbd.h> #include <linux/jbd2.h>
#include <linux/ext4_fs.h> #include <linux/ext4_fs.h>
#define EXT4_JOURNAL(inode) (EXT4_SB((inode)->i_sb)->s_journal) #define EXT4_JOURNAL(inode) (EXT4_SB((inode)->i_sb)->s_journal)
...@@ -116,7 +116,7 @@ static inline int ...@@ -116,7 +116,7 @@ static inline int
__ext4_journal_get_undo_access(const char *where, handle_t *handle, __ext4_journal_get_undo_access(const char *where, handle_t *handle,
struct buffer_head *bh) struct buffer_head *bh)
{ {
int err = journal_get_undo_access(handle, bh); int err = jbd2_journal_get_undo_access(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err; return err;
...@@ -126,7 +126,7 @@ static inline int ...@@ -126,7 +126,7 @@ static inline int
__ext4_journal_get_write_access(const char *where, handle_t *handle, __ext4_journal_get_write_access(const char *where, handle_t *handle,
struct buffer_head *bh) struct buffer_head *bh)
{ {
int err = journal_get_write_access(handle, bh); int err = jbd2_journal_get_write_access(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err; return err;
...@@ -135,13 +135,13 @@ __ext4_journal_get_write_access(const char *where, handle_t *handle, ...@@ -135,13 +135,13 @@ __ext4_journal_get_write_access(const char *where, handle_t *handle,
static inline void static inline void
ext4_journal_release_buffer(handle_t *handle, struct buffer_head *bh) ext4_journal_release_buffer(handle_t *handle, struct buffer_head *bh)
{ {
journal_release_buffer(handle, bh); jbd2_journal_release_buffer(handle, bh);
} }
static inline int static inline int
__ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh) __ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
{ {
int err = journal_forget(handle, bh); int err = jbd2_journal_forget(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err; return err;
...@@ -151,7 +151,7 @@ static inline int ...@@ -151,7 +151,7 @@ static inline int
__ext4_journal_revoke(const char *where, handle_t *handle, __ext4_journal_revoke(const char *where, handle_t *handle,
unsigned long blocknr, struct buffer_head *bh) unsigned long blocknr, struct buffer_head *bh)
{ {
int err = journal_revoke(handle, blocknr, bh); int err = jbd2_journal_revoke(handle, blocknr, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err; return err;
...@@ -161,7 +161,7 @@ static inline int ...@@ -161,7 +161,7 @@ static inline int
__ext4_journal_get_create_access(const char *where, __ext4_journal_get_create_access(const char *where,
handle_t *handle, struct buffer_head *bh) handle_t *handle, struct buffer_head *bh)
{ {
int err = journal_get_create_access(handle, bh); int err = jbd2_journal_get_create_access(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err; return err;
...@@ -171,7 +171,7 @@ static inline int ...@@ -171,7 +171,7 @@ static inline int
__ext4_journal_dirty_metadata(const char *where, __ext4_journal_dirty_metadata(const char *where,
handle_t *handle, struct buffer_head *bh) handle_t *handle, struct buffer_head *bh)
{ {
int err = journal_dirty_metadata(handle, bh); int err = jbd2_journal_dirty_metadata(handle, bh);
if (err) if (err)
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
return err; return err;
...@@ -211,22 +211,22 @@ static inline handle_t *ext4_journal_current_handle(void) ...@@ -211,22 +211,22 @@ static inline handle_t *ext4_journal_current_handle(void)
static inline int ext4_journal_extend(handle_t *handle, int nblocks) static inline int ext4_journal_extend(handle_t *handle, int nblocks)
{ {
return journal_extend(handle, nblocks); return jbd2_journal_extend(handle, nblocks);
} }
static inline int ext4_journal_restart(handle_t *handle, int nblocks) static inline int ext4_journal_restart(handle_t *handle, int nblocks)
{ {
return journal_restart(handle, nblocks); return jbd2_journal_restart(handle, nblocks);
} }
static inline int ext4_journal_blocks_per_page(struct inode *inode) static inline int ext4_journal_blocks_per_page(struct inode *inode)
{ {
return journal_blocks_per_page(inode); return jbd2_journal_blocks_per_page(inode);
} }
static inline int ext4_journal_force_commit(journal_t *journal) static inline int ext4_journal_force_commit(journal_t *journal)
{ {
return journal_force_commit(journal); return jbd2_journal_force_commit(journal);
} }
/* super.c */ /* super.c */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment