1/*
2 * jfs_dat.h --- stripped down header file which only contains the JFS
3 * 	on-disk data structures
4 */
5
6#define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
7
8/*
9 * On-disk structures
10 */
11
12/*
13 * Descriptor block types:
14 */
15
16#define JFS_DESCRIPTOR_BLOCK	1
17#define JFS_COMMIT_BLOCK	2
18#define JFS_SUPERBLOCK		3
19
20/*
21 * Standard header for all descriptor blocks:
22 */
23typedef struct journal_header_s
24{
25	__u32		h_magic;
26	__u32		h_blocktype;
27	__u32		h_sequence;
28} journal_header_t;
29
30
31/*
32 * The block tag: used to describe a single buffer in the journal
33 */
34typedef struct journal_block_tag_s
35{
36	__u32		t_blocknr;	/* The on-disk block number */
37	__u32		t_flags;	/* See below */
38} journal_block_tag_t;
39
40/* Definitions for the journal tag flags word: */
41#define JFS_FLAG_ESCAPE		1	/* on-disk block is escaped */
42#define JFS_FLAG_SAME_UUID	2	/* block has same uuid as previous */
43#define JFS_FLAG_DELETED	4	/* block deleted by this transaction */
44#define JFS_FLAG_LAST_TAG	8	/* last tag in this descriptor block */
45
46
47/*
48 * The journal superblock
49 */
50typedef struct journal_superblock_s
51{
52	journal_header_t s_header;
53
54	/* Static information describing the journal */
55	__u32		s_blocksize;	/* journal device blocksize */
56	__u32		s_maxlen;	/* total blocks in journal file */
57	__u32		s_first;	/* first block of log information */
58
59	/* Dynamic information describing the current state of the log */
60	__u32		s_sequence;	/* first commit ID expected in log */
61	__u32		s_start;	/* blocknr of start of log */
62
63} journal_superblock_t;
64
65