Commit cd02ff0b14b7e27cbdfd7ff2814b08199a2b7168

Authored by Mingming Cao
Committed by Theodore Ts'o
1 parent d802ffa885

jbd2: JBD_XXX to JBD2_XXX naming cleanup

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>

Showing 9 changed files with 30 additions and 29 deletions Side-by-side Diff

... ... @@ -33,7 +33,7 @@
33 33 #include <linux/fs.h>
34 34 #include <linux/time.h>
35 35 #include <linux/ext4_jbd2.h>
36   -#include <linux/jbd.h>
  36 +#include <linux/jbd2.h>
37 37 #include <linux/highuid.h>
38 38 #include <linux/pagemap.h>
39 39 #include <linux/quotaops.h>
... ... @@ -1037,7 +1037,7 @@
1037 1037 if (option < 0)
1038 1038 return 0;
1039 1039 if (option == 0)
1040   - option = JBD_DEFAULT_MAX_COMMIT_AGE;
  1040 + option = JBD2_DEFAULT_MAX_COMMIT_AGE;
1041 1041 sbi->s_commit_interval = HZ * option;
1042 1042 break;
1043 1043 case Opt_data_journal:
... ... @@ -278,7 +278,7 @@
278 278 unsigned long long block)
279 279 {
280 280 tag->t_blocknr = cpu_to_be32(block & (u32)~0);
281   - if (tag_bytes > JBD_TAG_SIZE32)
  281 + if (tag_bytes > JBD2_TAG_SIZE32)
282 282 tag->t_blocknr_high = cpu_to_be32((block >> 31) >> 1);
283 283 }
284 284  
... ... @@ -670,7 +670,7 @@
670 670 spin_lock_init(&journal->j_list_lock);
671 671 spin_lock_init(&journal->j_state_lock);
672 672  
673   - journal->j_commit_interval = (HZ * JBD_DEFAULT_MAX_COMMIT_AGE);
  673 + journal->j_commit_interval = (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE);
674 674  
675 675 /* The journal is marked for error until we succeed with recovery! */
676 676 journal->j_flags = JBD2_ABORT;
677 677  
... ... @@ -1612,9 +1612,9 @@
1612 1612 size_t journal_tag_bytes(journal_t *journal)
1613 1613 {
1614 1614 if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT))
1615   - return JBD_TAG_SIZE64;
  1615 + return JBD2_TAG_SIZE64;
1616 1616 else
1617   - return JBD_TAG_SIZE32;
  1617 + return JBD2_TAG_SIZE32;
1618 1618 }
1619 1619  
1620 1620 /*
... ... @@ -1681,7 +1681,7 @@
1681 1681 {
1682 1682 #ifdef CONFIG_JBD2_DEBUG
1683 1683 atomic_dec(&nr_journal_heads);
1684   - memset(jh, JBD_POISON_FREE, sizeof(*jh));
  1684 + memset(jh, JBD2_POISON_FREE, sizeof(*jh));
1685 1685 #endif
1686 1686 kmem_cache_free(jbd2_journal_head_cache, jh);
1687 1687 }
... ... @@ -311,7 +311,7 @@
311 311 static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag)
312 312 {
313 313 unsigned long long block = be32_to_cpu(tag->t_blocknr);
314   - if (tag_bytes > JBD_TAG_SIZE32)
  314 + if (tag_bytes > JBD2_TAG_SIZE32)
315 315 block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32;
316 316 return block;
317 317 }
... ... @@ -352,7 +352,7 @@
352 352 if (bh)
353 353 BUFFER_TRACE(bh, "found on hash");
354 354 }
355   -#ifdef JBD_EXPENSIVE_CHECKING
  355 +#ifdef JBD2_EXPENSIVE_CHECKING
356 356 else {
357 357 struct buffer_head *bh2;
358 358  
... ... @@ -453,7 +453,7 @@
453 453 }
454 454 }
455 455  
456   -#ifdef JBD_EXPENSIVE_CHECKING
  456 +#ifdef JBD2_EXPENSIVE_CHECKING
457 457 /* There better not be one left behind by now! */
458 458 record = find_revoke_record(journal, bh->b_blocknr);
459 459 J_ASSERT_JH(jh, record == NULL);
include/linux/ext4_jbd2.h
... ... @@ -12,8 +12,8 @@
12 12 * Ext4-specific journaling extensions.
13 13 */
14 14  
15   -#ifndef _LINUX_EXT4_JBD_H
16   -#define _LINUX_EXT4_JBD_H
  15 +#ifndef _LINUX_EXT4_JBD2_H
  16 +#define _LINUX_EXT4_JBD2_H
17 17  
18 18 #include <linux/fs.h>
19 19 #include <linux/jbd2.h>
... ... @@ -228,5 +228,5 @@
228 228 return 0;
229 229 }
230 230  
231   -#endif /* _LINUX_EXT4_JBD_H */
  231 +#endif /* _LINUX_EXT4_JBD2_H */
include/linux/jbd2.h
... ... @@ -13,8 +13,8 @@
13 13 * filesystem journaling support.
14 14 */
15 15  
16   -#ifndef _LINUX_JBD_H
17   -#define _LINUX_JBD_H
  16 +#ifndef _LINUX_JBD2_H
  17 +#define _LINUX_JBD2_H
18 18  
19 19 /* Allow this file to be included directly into e2fsprogs */
20 20 #ifndef __KERNEL__
21 21  
22 22  
23 23  
24 24  
25 25  
... ... @@ -37,26 +37,26 @@
37 37 #define journal_oom_retry 1
38 38  
39 39 /*
40   - * Define JBD_PARANIOD_IOFAIL to cause a kernel BUG() if ext3 finds
  40 + * Define JBD2_PARANIOD_IOFAIL to cause a kernel BUG() if ext4 finds
41 41 * certain classes of error which can occur due to failed IOs. Under
42   - * normal use we want ext3 to continue after such errors, because
  42 + * normal use we want ext4 to continue after such errors, because
43 43 * hardware _can_ fail, but for debugging purposes when running tests on
44 44 * known-good hardware we may want to trap these errors.
45 45 */
46   -#undef JBD_PARANOID_IOFAIL
  46 +#undef JBD2_PARANOID_IOFAIL
47 47  
48 48 /*
49 49 * The default maximum commit age, in seconds.
50 50 */
51   -#define JBD_DEFAULT_MAX_COMMIT_AGE 5
  51 +#define JBD2_DEFAULT_MAX_COMMIT_AGE 5
52 52  
53 53 #ifdef CONFIG_JBD2_DEBUG
54 54 /*
55   - * Define JBD_EXPENSIVE_CHECKING to enable more expensive internal
  55 + * Define JBD2_EXPENSIVE_CHECKING to enable more expensive internal
56 56 * consistency checks. By default we don't do this unless
57 57 * CONFIG_JBD2_DEBUG is on.
58 58 */
59   -#define JBD_EXPENSIVE_CHECKING
  59 +#define JBD2_EXPENSIVE_CHECKING
60 60 extern u8 jbd2_journal_enable_debug;
61 61  
62 62 #define jbd_debug(n, f, a...) \
... ... @@ -163,8 +163,8 @@
163 163 __be32 t_blocknr_high; /* most-significant high 32bits. */
164 164 } journal_block_tag_t;
165 165  
166   -#define JBD_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
167   -#define JBD_TAG_SIZE64 (sizeof(journal_block_tag_t))
  166 +#define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
  167 +#define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t))
168 168  
169 169 /*
170 170 * The revoke descriptor: used on disk to describe a series of blocks to
... ... @@ -256,8 +256,8 @@
256 256 #include <linux/fs.h>
257 257 #include <linux/sched.h>
258 258  
259   -#define JBD_ASSERTIONS
260   -#ifdef JBD_ASSERTIONS
  259 +#define JBD2_ASSERTIONS
  260 +#ifdef JBD2_ASSERTIONS
261 261 #define J_ASSERT(assert) \
262 262 do { \
263 263 if (!(assert)) { \
264 264  
... ... @@ -284,9 +284,9 @@
284 284  
285 285 #else
286 286 #define J_ASSERT(assert) do { } while (0)
287   -#endif /* JBD_ASSERTIONS */
  287 +#endif /* JBD2_ASSERTIONS */
288 288  
289   -#if defined(JBD_PARANOID_IOFAIL)
  289 +#if defined(JBD2_PARANOID_IOFAIL)
290 290 #define J_EXPECT(expr, why...) J_ASSERT(expr)
291 291 #define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)
292 292 #define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr)
... ... @@ -1104,5 +1104,5 @@
1104 1104  
1105 1105 #endif /* __KERNEL__ */
1106 1106  
1107   -#endif /* _LINUX_JBD_H */
  1107 +#endif /* _LINUX_JBD2_H */
include/linux/poison.h
... ... @@ -36,7 +36,8 @@
36 36 */
37 37  
38 38 /********** fs/jbd/journal.c **********/
39   -#define JBD_POISON_FREE 0x5b
  39 +#define JBD_POISON_FREE 0x5b
  40 +#define JBD2_POISON_FREE 0x5c
40 41  
41 42 /********** drivers/base/dmapool.c **********/
42 43 #define POOL_POISON_FREED 0xa7 /* !inuse */