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