5 #include "kernel-list.h"
7 #ifdef HAVE_NETINET_IN_H
8 #include <netinet/in.h>
13 #include <arpa/inet.h>
22 #define REQ_OP_WRITE 1
24 #define cpu_to_le16(x) ext2fs_cpu_to_le16(x)
25 #define cpu_to_be16(x) ext2fs_cpu_to_be16(x)
26 #define cpu_to_le32(x) ext2fs_cpu_to_le32(x)
27 #define cpu_to_be32(x) ext2fs_cpu_to_be32(x)
28 #define cpu_to_le64(x) ext2fs_cpu_to_le64(x)
29 #define cpu_to_be64(x) ext2fs_cpu_to_be64(x)
31 #define le16_to_cpu(x) ext2fs_le16_to_cpu(x)
32 #define be16_to_cpu(x) ext2fs_be16_to_cpu(x)
33 #define le32_to_cpu(x) ext2fs_le32_to_cpu(x)
34 #define be32_to_cpu(x) ext2fs_be32_to_cpu(x)
35 #define le64_to_cpu(x) ext2fs_le64_to_cpu(x)
36 #define be64_to_cpu(x) ext2fs_be64_to_cpu(x)
38 typedef unsigned int tid_t;
39 typedef struct journal_s journal_t;
40 typedef struct kdev_s *kdev_t;
45 typedef unsigned int gfp_t;
48 #define __GFP_NOFAIL 0
49 #define JBD2_TAG_SIZE32 JBD_TAG_SIZE32
50 #define JBD2_BARRIER 0
52 #define put_bh(x) brelse(x)
54 static inline __u32 jbd2_chksum(journal_t *j EXT2FS_ATTR((unused)),
55 __u32 crc, const void *address,
58 return ext2fs_crc32c_le(crc, address, length);
60 #define crc32_be(x, y, z) ext2fs_crc32_be((x), (y), (z))
61 #define spin_lock_init(x)
63 #define spin_unlock(x)
64 #define SLAB_HWCACHE_ALIGN 0
65 #define SLAB_TEMPORARY 0
66 #define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\
67 sizeof(struct __struct), __alignof__(struct __struct),\
70 #define blkdev_issue_flush(kdev, a) sync_blockdev(kdev)
71 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
75 enum passtype {PASS_SCAN, PASS_REVOKE, PASS_REPLAY};
77 #define JBD2_FC_REPLAY_STOP 0
78 #define JBD2_FC_REPLAY_CONTINUE 1
82 unsigned long j_flags;
84 struct buffer_head * j_sb_buffer;
85 struct journal_superblock_s *j_superblock;
89 unsigned long j_fc_first;
90 unsigned long j_fc_off;
91 unsigned long j_fc_last;
93 unsigned long j_first, j_last;
97 unsigned int j_blk_offset;
98 unsigned int j_total_len;
99 struct inode * j_inode;
100 tid_t j_tail_sequence;
101 tid_t j_transaction_sequence;
103 struct jbd2_revoke_table_s *j_revoke;
104 struct jbd2_revoke_table_s *j_revoke_table[2];
105 tid_t j_failed_commit;
107 int (*j_fc_replay_callback)(struct journal_s *journal,
108 struct buffer_head *bh,
109 enum passtype pass, int off,
114 #define is_journal_abort(x) 0
116 #define BUFFER_TRACE(bh, info) do {} while (0)
118 /* Need this so we can compile with configure --enable-gcc-wall */
119 #ifdef NO_INLINE_FUNCS
123 #endif /* _JFS_COMPAT_H */