Annotation of /trunk/mkinitrd-magellan/klibc/usr/kinit/fstype/reiserfs_fs.h
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 2996 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 2996 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | niro | 532 | struct journal_params { |
2 | __u32 jp_journal_1st_block; /* where does journal start from on its | ||
3 | * device */ | ||
4 | __u32 jp_journal_dev; /* journal device st_rdev */ | ||
5 | __u32 jp_journal_size; /* size of the journal */ | ||
6 | __u32 jp_journal_trans_max; /* max number of blocks in a transaction. */ | ||
7 | __u32 jp_journal_magic; /* random value made on fs creation (this | ||
8 | * was sb_journal_block_count) */ | ||
9 | __u32 jp_journal_max_batch; /* max number of blocks to batch into a | ||
10 | * trans */ | ||
11 | __u32 jp_journal_max_commit_age; /* in seconds, how old can an async | ||
12 | * commit be */ | ||
13 | __u32 jp_journal_max_trans_age; /* in seconds, how old can a transaction | ||
14 | * be */ | ||
15 | }; | ||
16 | |||
17 | /* this is the super from 3.5.X, where X >= 10 */ | ||
18 | struct reiserfs_super_block_v1 { | ||
19 | __u32 s_block_count; /* blocks count */ | ||
20 | __u32 s_free_blocks; /* free blocks count */ | ||
21 | __u32 s_root_block; /* root block number */ | ||
22 | struct journal_params s_journal; | ||
23 | __u16 s_blocksize; /* block size */ | ||
24 | __u16 s_oid_maxsize; /* max size of object id array, see | ||
25 | * get_objectid() commentary */ | ||
26 | __u16 s_oid_cursize; /* current size of object id array */ | ||
27 | __u16 s_umount_state; /* this is set to 1 when filesystem was | ||
28 | * umounted, to 2 - when not */ | ||
29 | char s_magic[10]; /* reiserfs magic string indicates that | ||
30 | * file system is reiserfs: | ||
31 | * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */ | ||
32 | __u16 s_fs_state; /* it is set to used by fsck to mark which | ||
33 | * phase of rebuilding is done */ | ||
34 | __u32 s_hash_function_code; /* indicate, what hash function is being use | ||
35 | * to sort names in a directory*/ | ||
36 | __u16 s_tree_height; /* height of disk tree */ | ||
37 | __u16 s_bmap_nr; /* amount of bitmap blocks needed to address | ||
38 | * each block of file system */ | ||
39 | __u16 s_version; /* this field is only reliable on filesystem | ||
40 | * with non-standard journal */ | ||
41 | __u16 s_reserved_for_journal; /* size in blocks of journal area on main | ||
42 | * device, we need to keep after | ||
43 | * making fs with non-standard journal */ | ||
44 | } __attribute__ ((__packed__)); | ||
45 | |||
46 | /* this is the on disk super block */ | ||
47 | struct reiserfs_super_block { | ||
48 | struct reiserfs_super_block_v1 s_v1; | ||
49 | __u32 s_inode_generation; | ||
50 | __u32 s_flags; /* Right now used only by inode-attributes, if enabled */ | ||
51 | unsigned char s_uuid[16]; /* filesystem unique identifier */ | ||
52 | unsigned char s_label[16]; /* filesystem volume label */ | ||
53 | char s_unused[88]; /* zero filled by mkreiserfs and | ||
54 | * reiserfs_convert_objectid_map_v1() | ||
55 | * so any additions must be updated | ||
56 | * there as well. */ | ||
57 | } __attribute__ ((__packed__)); | ||
58 | |||
59 | #define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" | ||
60 | #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" | ||
61 | #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" | ||
62 | |||
63 | #define SB_V1_DISK_SUPER_BLOCK(s) (&((s)->s_v1)) | ||
64 | #define REISERFS_BLOCKSIZE(s) \ | ||
65 | __le32_to_cpu((SB_V1_DISK_SUPER_BLOCK(s)->s_blocksize)) | ||
66 | #define REISERFS_BLOCK_COUNT(s) \ | ||
67 | __le32_to_cpu((SB_V1_DISK_SUPER_BLOCK(s)->s_block_count)) | ||
68 | #define REISERFS_MAGIC(s) \ | ||
69 | (SB_V1_DISK_SUPER_BLOCK(s)->s_magic) |