Annotation of /trunk/mkinitrd-magellan/klibc/usr/kinit/fstype/ocfs2_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: 3284 byte(s)
Fri Apr 24 18:32:46 2009 UTC (15 years ago) by niro
File MIME type: text/plain
File size: 3284 byte(s)
-updated to klibc-1.5.15
1 | niro | 815 | #ifndef _OCFS2_FS_H |
2 | #define _OCFS2_FS_H | ||
3 | |||
4 | /* Object signatures */ | ||
5 | #define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2" | ||
6 | |||
7 | #define OCFS2_VOL_UUID_LEN 16 | ||
8 | #define OCFS2_MAX_VOL_LABEL_LEN 64 | ||
9 | |||
10 | /* | ||
11 | * On disk superblock for OCFS2 | ||
12 | * Note that it is contained inside an ocfs2_dinode, so all offsets | ||
13 | * are relative to the start of ocfs2_dinode.id2. | ||
14 | */ | ||
15 | struct ocfs2_super_block { | ||
16 | /*00*/ uint16_t s_major_rev_level; | ||
17 | uint16_t s_minor_rev_level; | ||
18 | uint16_t s_mnt_count; | ||
19 | int16_t s_max_mnt_count; | ||
20 | uint16_t s_state; /* File system state */ | ||
21 | uint16_t s_errors; /* Behaviour when detecting errors */ | ||
22 | uint32_t s_checkinterval; /* Max time between checks */ | ||
23 | /*10*/ uint64_t s_lastcheck; /* Time of last check */ | ||
24 | uint32_t s_creator_os; /* OS */ | ||
25 | uint32_t s_feature_compat; /* Compatible feature set */ | ||
26 | /*20*/ uint32_t s_feature_incompat; /* Incompatible feature set */ | ||
27 | uint32_t s_feature_ro_compat; /* Readonly-compatible feature set */ | ||
28 | uint64_t s_root_blkno; /* Offset, in blocks, of root directory | ||
29 | dinode */ | ||
30 | /*30*/ uint64_t s_system_dir_blkno; /* Offset, in blocks, of system | ||
31 | directory dinode */ | ||
32 | uint32_t s_blocksize_bits; /* Blocksize for this fs */ | ||
33 | uint32_t s_clustersize_bits; /* Clustersize for this fs */ | ||
34 | /*40*/ uint16_t s_max_slots; /* Max number of simultaneous mounts | ||
35 | before tunefs required */ | ||
36 | uint16_t s_reserved1; | ||
37 | uint32_t s_reserved2; | ||
38 | uint64_t s_first_cluster_group; /* Block offset of 1st cluster | ||
39 | * group header */ | ||
40 | /*50*/ uint8_t s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */ | ||
41 | /*90*/ uint8_t s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */ | ||
42 | /*A0*/ | ||
43 | } __attribute__ ((packed)); | ||
44 | |||
45 | /* | ||
46 | * On disk inode for OCFS2 | ||
47 | */ | ||
48 | struct ocfs2_dinode { | ||
49 | /*00*/ uint8_t i_signature[8]; /* Signature for validation */ | ||
50 | uint32_t i_generation; /* Generation number */ | ||
51 | uint16_t i_suballoc_slot; /* Slot suballocator this inode | ||
52 | belongs to */ | ||
53 | int16_t i_suballoc_bit; /* Bit offset in suballocator | ||
54 | block group */ | ||
55 | /*10*/ uint32_t i_reserved0; | ||
56 | uint32_t i_clusters; /* Cluster count */ | ||
57 | uint32_t i_uid; /* Owner UID */ | ||
58 | uint32_t i_gid; /* Owning GID */ | ||
59 | /*20*/ uint64_t i_size; /* Size in bytes */ | ||
60 | uint16_t i_mode; /* File mode */ | ||
61 | uint16_t i_links_count; /* Links count */ | ||
62 | uint32_t i_flags; /* File flags */ | ||
63 | /*30*/ uint64_t i_atime; /* Access time */ | ||
64 | uint64_t i_ctime; /* Creation time */ | ||
65 | /*40*/ uint64_t i_mtime; /* Modification time */ | ||
66 | uint64_t i_dtime; /* Deletion time */ | ||
67 | /*50*/ uint64_t i_blkno; /* Offset on disk, in blocks */ | ||
68 | uint64_t i_last_eb_blk; /* Pointer to last extent | ||
69 | block */ | ||
70 | /*60*/ uint32_t i_fs_generation; /* Generation per fs-instance */ | ||
71 | uint32_t i_atime_nsec; | ||
72 | uint32_t i_ctime_nsec; | ||
73 | uint32_t i_mtime_nsec; | ||
74 | uint32_t i_attr; | ||
75 | uint16_t i_orphaned_slot; /* Only valid when OCFS2_ORPHANED_FL | ||
76 | was set in i_flags */ | ||
77 | uint16_t i_reserved1; | ||
78 | /*70*/ uint64_t i_reserved2[8]; | ||
79 | /*B8*/ uint64_t i_pad1; | ||
80 | uint64_t i_rdev; /* Device number */ | ||
81 | uint32_t i_used; /* Bits (ie, clusters) used */ | ||
82 | uint32_t i_total; /* Total bits (clusters) | ||
83 | available */ | ||
84 | uint32_t ij_flags; /* Mounted, version, etc. */ | ||
85 | uint32_t ij_pad; | ||
86 | /*C0*/ struct ocfs2_super_block i_super; | ||
87 | /* Actual on-disk size is one block */ | ||
88 | } __attribute__ ((packed)); | ||
89 | |||
90 | #endif /* _OCFS2_FS_H */ |