4 /* Object signatures */
5 #define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2"
7 #define OCFS2_VOL_UUID_LEN 16
8 #define OCFS2_MAX_VOL_LABEL_LEN 64
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.
15 struct ocfs2_super_block
{
16 /*00*/ uint16_t s_major_rev_level
;
17 uint16_t s_minor_rev_level
;
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
30 /*30*/ uint64_t s_system_dir_blkno
; /* Offset, in blocks, of system
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 */
38 uint64_t s_first_cluster_group
; /* Block offset of 1st cluster
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 */
43 } __attribute__ ((packed
));
46 * On disk inode for OCFS2
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
53 int16_t i_suballoc_bit
; /* Bit offset in suballocator
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
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
;
75 uint16_t i_orphaned_slot
; /* Only valid when OCFS2_ORPHANED_FL
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)
84 uint32_t ij_flags
; /* Mounted, version, etc. */
86 /*C0*/ struct ocfs2_super_block i_super
;
87 /* Actual on-disk size is one block */
88 } __attribute__ ((packed
));
90 #endif /* _OCFS2_FS_H */