1 diff -rup linux-2.4.20-uml/fs/jbd/transaction.c linux-2.4.21-rc2/fs/jbd/transaction.c
2 --- linux-2.4.20-uml/fs/jbd/transaction.c Thu Nov 28 16:53:15 2002
3 +++ linux-2.4.21-rc2/fs/jbd/transaction.c Fri May 16 11:00:40 2003
4 @@ -735,7 +743,8 @@ done_locked:
8 - J_ASSERT_JH(jh, buffer_uptodate(jh2bh(jh)));
9 + J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)),
10 + "Possible IO failure.\n");
11 page = jh2bh(jh)->b_page;
12 offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK;
14 diff -rup linux-2.4.20-uml/include/linux/jbd.h linux-2.4.21-rc2/include/linux/jbd.h
15 --- linux-2.4.20-uml/include/linux/jbd.h Mon Aug 25 16:16:57 2003
16 +++ linux-2.4.21-rc2/include/linux/jbd.h Tue May 13 13:28:29 2003
19 #undef JBD_PARANOID_WRITES
22 + * Define JBD_PARANIOD_IOFAIL to cause a kernel BUG() if ext3 finds
23 + * certain classes of error which can occur due to failed IOs. Under
24 + * normal use we want ext3 to continue after such errors, because
25 + * hardware _can_ fail, but for debugging purposes when running tests on
26 + * known-good hardware we may want to trap these errors.
28 +#undef JBD_PARANOID_IOFAIL
30 #ifdef CONFIG_JBD_DEBUG
32 * Define JBD_EXPENSIVE_CHECKING to enable more expensive internal
33 @@ -232,6 +272,23 @@ void buffer_assertion_failure(struct buf
34 #define J_ASSERT(assert) do { } while (0)
35 #endif /* JBD_ASSERTIONS */
37 +#if defined(JBD_PARANOID_IOFAIL)
38 +#define J_EXPECT(expr, why...) J_ASSERT(expr)
39 +#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)
40 +#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr)
42 +#define __journal_expect(expr, why...) \
45 + printk(KERN_ERR "EXT3-fs unexpected failure: %s;\n", # expr); \
46 + printk(KERN_ERR why); \
49 +#define J_EXPECT(expr, why...) __journal_expect(expr, ## why)
50 +#define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why)
51 +#define J_EXPECT_JH(jh, expr, why...) __journal_expect(expr, ## why)
56 = BH_PrivateStart, /* 1 if being written to log (@@@ DEBUGGING) */