2000-12-09 08:47:45 +03:00
|
|
|
|
|
|
|
#ifndef _JFS_COMPAT_H
|
|
|
|
#define _JFS_COMPAT_H
|
|
|
|
|
2001-12-24 03:33:51 +03:00
|
|
|
#include "kernel-list.h"
|
2000-12-09 08:47:45 +03:00
|
|
|
#include <errno.h>
|
2001-01-06 06:51:25 +03:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
2000-12-09 08:47:45 +03:00
|
|
|
|
|
|
|
#define printk printf
|
|
|
|
#define KERN_ERR ""
|
|
|
|
#define KERN_DEBUG ""
|
|
|
|
|
|
|
|
#define READ 0
|
|
|
|
#define WRITE 1
|
|
|
|
|
|
|
|
#define cpu_to_be32(n) htonl(n)
|
|
|
|
#define be32_to_cpu(n) ntohl(n)
|
2012-08-03 04:47:45 +04:00
|
|
|
#define cpu_to_be16(n) htons(n)
|
|
|
|
#define be16_to_cpu(n) ntohs(n)
|
2000-12-09 08:47:45 +03:00
|
|
|
|
2003-12-07 09:28:50 +03:00
|
|
|
typedef unsigned int tid_t;
|
2000-12-09 08:47:45 +03:00
|
|
|
typedef struct journal_s journal_t;
|
|
|
|
|
|
|
|
struct buffer_head;
|
|
|
|
struct inode;
|
|
|
|
|
|
|
|
struct journal_s
|
|
|
|
{
|
|
|
|
unsigned long j_flags;
|
|
|
|
int j_errno;
|
|
|
|
struct buffer_head * j_sb_buffer;
|
|
|
|
struct journal_superblock_s *j_superblock;
|
|
|
|
int j_format_version;
|
|
|
|
unsigned long j_head;
|
|
|
|
unsigned long j_tail;
|
|
|
|
unsigned long j_free;
|
|
|
|
unsigned long j_first, j_last;
|
|
|
|
kdev_t j_dev;
|
2001-12-16 10:23:36 +03:00
|
|
|
kdev_t j_fs_dev;
|
2000-12-09 08:47:45 +03:00
|
|
|
int j_blocksize;
|
|
|
|
unsigned int j_blk_offset;
|
|
|
|
unsigned int j_maxlen;
|
|
|
|
struct inode * j_inode;
|
|
|
|
tid_t j_tail_sequence;
|
|
|
|
tid_t j_transaction_sequence;
|
|
|
|
__u8 j_uuid[16];
|
2001-12-16 10:23:36 +03:00
|
|
|
struct jbd_revoke_table_s *j_revoke;
|
2008-05-23 09:00:19 +04:00
|
|
|
tid_t j_failed_commit;
|
2000-12-09 08:47:45 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#define J_ASSERT(assert) \
|
|
|
|
do { if (!(assert)) { \
|
|
|
|
printf ("Assertion failure in %s() at %s line %d: " \
|
|
|
|
"\"%s\"\n", \
|
|
|
|
__FUNCTION__, __FILE__, __LINE__, # assert); \
|
|
|
|
fatal_error(e2fsck_global_ctx, 0); \
|
|
|
|
} } while (0)
|
|
|
|
|
|
|
|
#define is_journal_abort(x) 0
|
|
|
|
|
2001-12-16 10:23:36 +03:00
|
|
|
#define BUFFER_TRACE(bh, info) do {} while (0)
|
|
|
|
|
2001-01-06 06:51:25 +03:00
|
|
|
/* Need this so we can compile with configure --enable-gcc-wall */
|
|
|
|
#ifdef NO_INLINE_FUNCS
|
|
|
|
#define inline
|
|
|
|
#endif
|
|
|
|
|
2000-12-09 08:47:45 +03:00
|
|
|
#endif /* _JFS_COMPAT_H */
|