5 #include "kernel-list.h"
7 #ifdef HAVE_NETINET_IN_H
8 #include <netinet/in.h>
10 #include <arpa/inet.h>
19 #define cpu_to_be32(n) htonl(n)
20 #define be32_to_cpu(n) ntohl(n)
21 #define cpu_to_be16(n) htons(n)
22 #define be16_to_cpu(n) ntohs(n)
24 typedef unsigned int tid_t
;
25 typedef struct journal_s journal_t
;
26 typedef struct kdev_s
*kdev_t
;
32 #define JFS_TAG_SIZE32 JBD_TAG_SIZE32
35 #define JFS_CRC32_CHKSUM JBD2_CRC32_CHKSUM
36 #define JFS_CRC32_CHKSUM_SIZE JBD2_CRC32_CHKSUM_SIZE
37 #define put_bh(x) brelse(x)
38 #define be64_to_cpu(x) ext2fs_be64_to_cpu(x)
40 static inline __u32
jbd2_chksum(journal_t
*j
EXT2FS_ATTR((unused
)),
41 __u32 crc
, const void *address
,
44 return ext2fs_crc32c_le(crc
, address
, length
);
46 #define crc32_be(x, y, z) ext2fs_crc32_be((x), (y), (z))
47 #define spin_lock_init(x)
49 #define spin_unlock(x)
51 #define SLAB_HWCACHE_ALIGN 0
52 #define SLAB_TEMPORARY 0
53 #define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\
54 sizeof(struct __struct), __alignof__(struct __struct),\
57 #define blkdev_issue_flush(kdev, a, b) sync_blockdev(kdev)
58 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
62 unsigned long j_flags
;
64 struct buffer_head
* j_sb_buffer
;
65 struct journal_superblock_s
*j_superblock
;
70 unsigned long j_first
, j_last
;
74 unsigned int j_blk_offset
;
75 unsigned int j_maxlen
;
76 struct inode
* j_inode
;
77 tid_t j_tail_sequence
;
78 tid_t j_transaction_sequence
;
80 struct jbd2_revoke_table_s
*j_revoke
;
81 struct jbd2_revoke_table_s
*j_revoke_table
[2];
82 tid_t j_failed_commit
;
86 #define J_ASSERT(assert) \
87 do { if (!(assert)) { \
88 printf ("Assertion failure in %s() at %s line %d: " \
90 __FUNCTION__, __FILE__, __LINE__, # assert); \
91 fatal_error(e2fsck_global_ctx, 0); \
94 #define is_journal_abort(x) 0
96 #define BUFFER_TRACE(bh, info) do {} while (0)
98 /* Need this so we can compile with configure --enable-gcc-wall */
99 #ifdef NO_INLINE_FUNCS
103 #endif /* _JFS_COMPAT_H */