aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/jbd2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r--include/linux/jbd2.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index f1011f7f3d41..a4d2e9f7088a 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -30,6 +30,7 @@
30#include <linux/bit_spinlock.h> 30#include <linux/bit_spinlock.h>
31#include <linux/mutex.h> 31#include <linux/mutex.h>
32#include <linux/timer.h> 32#include <linux/timer.h>
33#include <linux/slab.h>
33#endif 34#endif
34 35
35#define journal_oom_retry 1 36#define journal_oom_retry 1
@@ -69,15 +70,8 @@ extern u8 jbd2_journal_enable_debug;
69#define jbd_debug(f, a...) /**/ 70#define jbd_debug(f, a...) /**/
70#endif 71#endif
71 72
72static inline void *jbd2_alloc(size_t size, gfp_t flags) 73extern void *jbd2_alloc(size_t size, gfp_t flags);
73{ 74extern void jbd2_free(void *ptr, size_t size);
74 return (void *)__get_free_pages(flags, get_order(size));
75}
76
77static inline void jbd2_free(void *ptr, size_t size)
78{
79 free_pages((unsigned long)ptr, get_order(size));
80};
81 75
82#define JBD2_MIN_JOURNAL_BLOCKS 1024 76#define JBD2_MIN_JOURNAL_BLOCKS 1024
83 77
@@ -284,19 +278,8 @@ typedef struct journal_superblock_s
284 278
285#define J_ASSERT(assert) BUG_ON(!(assert)) 279#define J_ASSERT(assert) BUG_ON(!(assert))
286 280
287#if defined(CONFIG_BUFFER_DEBUG)
288void buffer_assertion_failure(struct buffer_head *bh);
289#define J_ASSERT_BH(bh, expr) \
290 do { \
291 if (!(expr)) \
292 buffer_assertion_failure(bh); \
293 J_ASSERT(expr); \
294 } while (0)
295#define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr)
296#else
297#define J_ASSERT_BH(bh, expr) J_ASSERT(expr) 281#define J_ASSERT_BH(bh, expr) J_ASSERT(expr)
298#define J_ASSERT_JH(jh, expr) J_ASSERT(expr) 282#define J_ASSERT_JH(jh, expr) J_ASSERT(expr)
299#endif
300 283
301#if defined(JBD2_PARANOID_IOFAIL) 284#if defined(JBD2_PARANOID_IOFAIL)
302#define J_EXPECT(expr, why...) J_ASSERT(expr) 285#define J_EXPECT(expr, why...) J_ASSERT(expr)
@@ -653,6 +636,7 @@ struct transaction_s
653 * waiting for it to finish. 636 * waiting for it to finish.
654 */ 637 */
655 unsigned int t_synchronous_commit:1; 638 unsigned int t_synchronous_commit:1;
639 unsigned int t_flushed_data_blocks:1;
656 640
657 /* 641 /*
658 * For use by the filesystem to store fs-specific data 642 * For use by the filesystem to store fs-specific data