Skip to content

Commit

Permalink
jbd2: JBD_XXX to JBD2_XXX naming cleanup
Browse files Browse the repository at this point in the history
change JBD_XXX macros to JBD2_XXX in JBD2/Ext4

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Mingming Cao authored and Theodore Ts'o committed Oct 17, 2007
1 parent d802ffa commit cd02ff0
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 29 deletions.
2 changes: 1 addition & 1 deletion fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <linux/fs.h>
#include <linux/time.h>
#include <linux/ext4_jbd2.h>
#include <linux/jbd.h>
#include <linux/jbd2.h>
#include <linux/highuid.h>
#include <linux/pagemap.h>
#include <linux/quotaops.h>
Expand Down
2 changes: 1 addition & 1 deletion fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ static int parse_options (char *options, struct super_block *sb,
if (option < 0)
return 0;
if (option == 0)
option = JBD_DEFAULT_MAX_COMMIT_AGE;
option = JBD2_DEFAULT_MAX_COMMIT_AGE;
sbi->s_commit_interval = HZ * option;
break;
case Opt_data_journal:
Expand Down
2 changes: 1 addition & 1 deletion fs/jbd2/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static inline void write_tag_block(int tag_bytes, journal_block_tag_t *tag,
unsigned long long block)
{
tag->t_blocknr = cpu_to_be32(block & (u32)~0);
if (tag_bytes > JBD_TAG_SIZE32)
if (tag_bytes > JBD2_TAG_SIZE32)
tag->t_blocknr_high = cpu_to_be32((block >> 31) >> 1);
}

Expand Down
8 changes: 4 additions & 4 deletions fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static journal_t * journal_init_common (void)
spin_lock_init(&journal->j_list_lock);
spin_lock_init(&journal->j_state_lock);

journal->j_commit_interval = (HZ * JBD_DEFAULT_MAX_COMMIT_AGE);
journal->j_commit_interval = (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE);

/* The journal is marked for error until we succeed with recovery! */
journal->j_flags = JBD2_ABORT;
Expand Down Expand Up @@ -1612,9 +1612,9 @@ int jbd2_journal_blocks_per_page(struct inode *inode)
size_t journal_tag_bytes(journal_t *journal)
{
if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT))
return JBD_TAG_SIZE64;
return JBD2_TAG_SIZE64;
else
return JBD_TAG_SIZE32;
return JBD2_TAG_SIZE32;
}

/*
Expand Down Expand Up @@ -1681,7 +1681,7 @@ static void journal_free_journal_head(struct journal_head *jh)
{
#ifdef CONFIG_JBD2_DEBUG
atomic_dec(&nr_journal_heads);
memset(jh, JBD_POISON_FREE, sizeof(*jh));
memset(jh, JBD2_POISON_FREE, sizeof(*jh));
#endif
kmem_cache_free(jbd2_journal_head_cache, jh);
}
Expand Down
2 changes: 1 addition & 1 deletion fs/jbd2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ int jbd2_journal_skip_recovery(journal_t *journal)
static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag)
{
unsigned long long block = be32_to_cpu(tag->t_blocknr);
if (tag_bytes > JBD_TAG_SIZE32)
if (tag_bytes > JBD2_TAG_SIZE32)
block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32;
return block;
}
Expand Down
4 changes: 2 additions & 2 deletions fs/jbd2/revoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int jbd2_journal_revoke(handle_t *handle, unsigned long long blocknr,
if (bh)
BUFFER_TRACE(bh, "found on hash");
}
#ifdef JBD_EXPENSIVE_CHECKING
#ifdef JBD2_EXPENSIVE_CHECKING
else {
struct buffer_head *bh2;

Expand Down Expand Up @@ -453,7 +453,7 @@ int jbd2_journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
}
}

#ifdef JBD_EXPENSIVE_CHECKING
#ifdef JBD2_EXPENSIVE_CHECKING
/* There better not be one left behind by now! */
record = find_revoke_record(journal, bh->b_blocknr);
J_ASSERT_JH(jh, record == NULL);
Expand Down
6 changes: 3 additions & 3 deletions include/linux/ext4_jbd2.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* Ext4-specific journaling extensions.
*/

#ifndef _LINUX_EXT4_JBD_H
#define _LINUX_EXT4_JBD_H
#ifndef _LINUX_EXT4_JBD2_H
#define _LINUX_EXT4_JBD2_H

#include <linux/fs.h>
#include <linux/jbd2.h>
Expand Down Expand Up @@ -228,4 +228,4 @@ static inline int ext4_should_writeback_data(struct inode *inode)
return 0;
}

#endif /* _LINUX_EXT4_JBD_H */
#endif /* _LINUX_EXT4_JBD2_H */
30 changes: 15 additions & 15 deletions include/linux/jbd2.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* filesystem journaling support.
*/

#ifndef _LINUX_JBD_H
#define _LINUX_JBD_H
#ifndef _LINUX_JBD2_H
#define _LINUX_JBD2_H

/* Allow this file to be included directly into e2fsprogs */
#ifndef __KERNEL__
Expand All @@ -37,26 +37,26 @@
#define journal_oom_retry 1

/*
* Define JBD_PARANIOD_IOFAIL to cause a kernel BUG() if ext3 finds
* Define JBD2_PARANIOD_IOFAIL to cause a kernel BUG() if ext4 finds
* certain classes of error which can occur due to failed IOs. Under
* normal use we want ext3 to continue after such errors, because
* normal use we want ext4 to continue after such errors, because
* hardware _can_ fail, but for debugging purposes when running tests on
* known-good hardware we may want to trap these errors.
*/
#undef JBD_PARANOID_IOFAIL
#undef JBD2_PARANOID_IOFAIL

/*
* The default maximum commit age, in seconds.
*/
#define JBD_DEFAULT_MAX_COMMIT_AGE 5
#define JBD2_DEFAULT_MAX_COMMIT_AGE 5

#ifdef CONFIG_JBD2_DEBUG
/*
* Define JBD_EXPENSIVE_CHECKING to enable more expensive internal
* Define JBD2_EXPENSIVE_CHECKING to enable more expensive internal
* consistency checks. By default we don't do this unless
* CONFIG_JBD2_DEBUG is on.
*/
#define JBD_EXPENSIVE_CHECKING
#define JBD2_EXPENSIVE_CHECKING
extern u8 jbd2_journal_enable_debug;

#define jbd_debug(n, f, a...) \
Expand Down Expand Up @@ -163,8 +163,8 @@ typedef struct journal_block_tag_s
__be32 t_blocknr_high; /* most-significant high 32bits. */
} journal_block_tag_t;

#define JBD_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
#define JBD_TAG_SIZE64 (sizeof(journal_block_tag_t))
#define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
#define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t))

/*
* The revoke descriptor: used on disk to describe a series of blocks to
Expand Down Expand Up @@ -256,8 +256,8 @@ typedef struct journal_superblock_s
#include <linux/fs.h>
#include <linux/sched.h>

#define JBD_ASSERTIONS
#ifdef JBD_ASSERTIONS
#define JBD2_ASSERTIONS
#ifdef JBD2_ASSERTIONS
#define J_ASSERT(assert) \
do { \
if (!(assert)) { \
Expand All @@ -284,9 +284,9 @@ void buffer_assertion_failure(struct buffer_head *bh);

#else
#define J_ASSERT(assert) do { } while (0)
#endif /* JBD_ASSERTIONS */
#endif /* JBD2_ASSERTIONS */

#if defined(JBD_PARANOID_IOFAIL)
#if defined(JBD2_PARANOID_IOFAIL)
#define J_EXPECT(expr, why...) J_ASSERT(expr)
#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)
#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr)
Expand Down Expand Up @@ -1104,4 +1104,4 @@ extern int jbd_blocks_per_page(struct inode *inode);

#endif /* __KERNEL__ */

#endif /* _LINUX_JBD_H */
#endif /* _LINUX_JBD2_H */
3 changes: 2 additions & 1 deletion include/linux/poison.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
*/

/********** fs/jbd/journal.c **********/
#define JBD_POISON_FREE 0x5b
#define JBD_POISON_FREE 0x5b
#define JBD2_POISON_FREE 0x5c

/********** drivers/base/dmapool.c **********/
#define POOL_POISON_FREED 0xa7 /* !inuse */
Expand Down

0 comments on commit cd02ff0

Please sign in to comment.