aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/extents.c2
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/jbd2/commit.c2
-rw-r--r--fs/jbd2/journal.c8
-rw-r--r--fs/jbd2/recovery.c2
-rw-r--r--fs/jbd2/revoke.c4
-rw-r--r--include/linux/ext4_jbd2.h6
-rw-r--r--include/linux/jbd2.h30
-rw-r--r--include/linux/poison.h3
9 files changed, 30 insertions, 29 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 78beb096f57d..2be404f68a76 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -33,7 +33,7 @@
33#include <linux/fs.h> 33#include <linux/fs.h>
34#include <linux/time.h> 34#include <linux/time.h>
35#include <linux/ext4_jbd2.h> 35#include <linux/ext4_jbd2.h>
36#include <linux/jbd.h> 36#include <linux/jbd2.h>
37#include <linux/highuid.h> 37#include <linux/highuid.h>
38#include <linux/pagemap.h> 38#include <linux/pagemap.h>
39#include <linux/quotaops.h> 39#include <linux/quotaops.h>
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4c8d31c61454..83f9cd358e5a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1037,7 +1037,7 @@ static int parse_options (char *options, struct super_block *sb,
1037 if (option < 0) 1037 if (option < 0)
1038 return 0; 1038 return 0;
1039 if (option == 0) 1039 if (option == 0)
1040 option = JBD_DEFAULT_MAX_COMMIT_AGE; 1040 option = JBD2_DEFAULT_MAX_COMMIT_AGE;
1041 sbi->s_commit_interval = HZ * option; 1041 sbi->s_commit_interval = HZ * option;
1042 break; 1042 break;
1043 case Opt_data_journal: 1043 case Opt_data_journal:
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 2cac34ac756a..b898ee4ef16a 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -278,7 +278,7 @@ static inline void write_tag_block(int tag_bytes, journal_block_tag_t *tag,
278 unsigned long long block) 278 unsigned long long block)
279{ 279{
280 tag->t_blocknr = cpu_to_be32(block & (u32)~0); 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 tag->t_blocknr_high = cpu_to_be32((block >> 31) >> 1); 282 tag->t_blocknr_high = cpu_to_be32((block >> 31) >> 1);
283} 283}
284 284
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index f12c65b81456..ff07bff88cf9 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -670,7 +670,7 @@ static journal_t * journal_init_common (void)
670 spin_lock_init(&journal->j_list_lock); 670 spin_lock_init(&journal->j_list_lock);
671 spin_lock_init(&journal->j_state_lock); 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 /* The journal is marked for error until we succeed with recovery! */ 675 /* The journal is marked for error until we succeed with recovery! */
676 journal->j_flags = JBD2_ABORT; 676 journal->j_flags = JBD2_ABORT;
@@ -1612,9 +1612,9 @@ int jbd2_journal_blocks_per_page(struct inode *inode)
1612size_t journal_tag_bytes(journal_t *journal) 1612size_t journal_tag_bytes(journal_t *journal)
1613{ 1613{
1614 if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT)) 1614 if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT))
1615 return JBD_TAG_SIZE64; 1615 return JBD2_TAG_SIZE64;
1616 else 1616 else
1617 return JBD_TAG_SIZE32; 1617 return JBD2_TAG_SIZE32;
1618} 1618}
1619 1619
1620/* 1620/*
@@ -1681,7 +1681,7 @@ static void journal_free_journal_head(struct journal_head *jh)
1681{ 1681{
1682#ifdef CONFIG_JBD2_DEBUG 1682#ifdef CONFIG_JBD2_DEBUG
1683 atomic_dec(&nr_journal_heads); 1683 atomic_dec(&nr_journal_heads);
1684 memset(jh, JBD_POISON_FREE, sizeof(*jh)); 1684 memset(jh, JBD2_POISON_FREE, sizeof(*jh));
1685#endif 1685#endif
1686 kmem_cache_free(jbd2_journal_head_cache, jh); 1686 kmem_cache_free(jbd2_journal_head_cache, jh);
1687} 1687}
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index b50be8a044eb..d0ce627539ef 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -311,7 +311,7 @@ int jbd2_journal_skip_recovery(journal_t *journal)
311static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag) 311static inline unsigned long long read_tag_block(int tag_bytes, journal_block_tag_t *tag)
312{ 312{
313 unsigned long long block = be32_to_cpu(tag->t_blocknr); 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 block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32; 315 block |= (u64)be32_to_cpu(tag->t_blocknr_high) << 32;
316 return block; 316 return block;
317} 317}
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index 01d88975e0c5..3595fd432d5b 100644
--- a/fs/jbd2/revoke.c
+++ b/fs/jbd2/revoke.c
@@ -352,7 +352,7 @@ int jbd2_journal_revoke(handle_t *handle, unsigned long long blocknr,
352 if (bh) 352 if (bh)
353 BUFFER_TRACE(bh, "found on hash"); 353 BUFFER_TRACE(bh, "found on hash");
354 } 354 }
355#ifdef JBD_EXPENSIVE_CHECKING 355#ifdef JBD2_EXPENSIVE_CHECKING
356 else { 356 else {
357 struct buffer_head *bh2; 357 struct buffer_head *bh2;
358 358
@@ -453,7 +453,7 @@ int jbd2_journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
453 } 453 }
454 } 454 }
455 455
456#ifdef JBD_EXPENSIVE_CHECKING 456#ifdef JBD2_EXPENSIVE_CHECKING
457 /* There better not be one left behind by now! */ 457 /* There better not be one left behind by now! */
458 record = find_revoke_record(journal, bh->b_blocknr); 458 record = find_revoke_record(journal, bh->b_blocknr);
459 J_ASSERT_JH(jh, record == NULL); 459 J_ASSERT_JH(jh, record == NULL);
diff --git a/include/linux/ext4_jbd2.h b/include/linux/ext4_jbd2.h
index d716e6392cf6..38c71d3c8dbf 100644
--- a/include/linux/ext4_jbd2.h
+++ b/include/linux/ext4_jbd2.h
@@ -12,8 +12,8 @@
12 * Ext4-specific journaling extensions. 12 * Ext4-specific journaling extensions.
13 */ 13 */
14 14
15#ifndef _LINUX_EXT4_JBD_H 15#ifndef _LINUX_EXT4_JBD2_H
16#define _LINUX_EXT4_JBD_H 16#define _LINUX_EXT4_JBD2_H
17 17
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/jbd2.h> 19#include <linux/jbd2.h>
@@ -228,4 +228,4 @@ static inline int ext4_should_writeback_data(struct inode *inode)
228 return 0; 228 return 0;
229} 229}
230 230
231#endif /* _LINUX_EXT4_JBD_H */ 231#endif /* _LINUX_EXT4_JBD2_H */
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 5f8b876c6677..06ef11457051 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -13,8 +13,8 @@
13 * filesystem journaling support. 13 * filesystem journaling support.
14 */ 14 */
15 15
16#ifndef _LINUX_JBD_H 16#ifndef _LINUX_JBD2_H
17#define _LINUX_JBD_H 17#define _LINUX_JBD2_H
18 18
19/* Allow this file to be included directly into e2fsprogs */ 19/* Allow this file to be included directly into e2fsprogs */
20#ifndef __KERNEL__ 20#ifndef __KERNEL__
@@ -37,26 +37,26 @@
37#define journal_oom_retry 1 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 * certain classes of error which can occur due to failed IOs. Under 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 * hardware _can_ fail, but for debugging purposes when running tests on 43 * hardware _can_ fail, but for debugging purposes when running tests on
44 * known-good hardware we may want to trap these errors. 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 * The default maximum commit age, in seconds. 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#ifdef CONFIG_JBD2_DEBUG 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 * consistency checks. By default we don't do this unless 56 * consistency checks. By default we don't do this unless
57 * CONFIG_JBD2_DEBUG is on. 57 * CONFIG_JBD2_DEBUG is on.
58 */ 58 */
59#define JBD_EXPENSIVE_CHECKING 59#define JBD2_EXPENSIVE_CHECKING
60extern u8 jbd2_journal_enable_debug; 60extern u8 jbd2_journal_enable_debug;
61 61
62#define jbd_debug(n, f, a...) \ 62#define jbd_debug(n, f, a...) \
@@ -163,8 +163,8 @@ typedef struct journal_block_tag_s
163 __be32 t_blocknr_high; /* most-significant high 32bits. */ 163 __be32 t_blocknr_high; /* most-significant high 32bits. */
164} journal_block_tag_t; 164} journal_block_tag_t;
165 165
166#define JBD_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high)) 166#define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
167#define JBD_TAG_SIZE64 (sizeof(journal_block_tag_t)) 167#define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t))
168 168
169/* 169/*
170 * The revoke descriptor: used on disk to describe a series of blocks to 170 * The revoke descriptor: used on disk to describe a series of blocks to
@@ -256,8 +256,8 @@ typedef struct journal_superblock_s
256#include <linux/fs.h> 256#include <linux/fs.h>
257#include <linux/sched.h> 257#include <linux/sched.h>
258 258
259#define JBD_ASSERTIONS 259#define JBD2_ASSERTIONS
260#ifdef JBD_ASSERTIONS 260#ifdef JBD2_ASSERTIONS
261#define J_ASSERT(assert) \ 261#define J_ASSERT(assert) \
262do { \ 262do { \
263 if (!(assert)) { \ 263 if (!(assert)) { \
@@ -284,9 +284,9 @@ void buffer_assertion_failure(struct buffer_head *bh);
284 284
285#else 285#else
286#define J_ASSERT(assert) do { } while (0) 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#define J_EXPECT(expr, why...) J_ASSERT(expr) 290#define J_EXPECT(expr, why...) J_ASSERT(expr)
291#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr) 291#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)
292#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr) 292#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr)
@@ -1104,4 +1104,4 @@ extern int jbd_blocks_per_page(struct inode *inode);
1104 1104
1105#endif /* __KERNEL__ */ 1105#endif /* __KERNEL__ */
1106 1106
1107#endif /* _LINUX_JBD_H */ 1107#endif /* _LINUX_JBD2_H */
diff --git a/include/linux/poison.h b/include/linux/poison.h
index d93c300a3449..a9c31be7052c 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -36,7 +36,8 @@
36 */ 36 */
37 37
38/********** fs/jbd/journal.c **********/ 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/********** drivers/base/dmapool.c **********/ 42/********** drivers/base/dmapool.c **********/
42#define POOL_POISON_FREED 0xa7 /* !inuse */ 43#define POOL_POISON_FREED 0xa7 /* !inuse */