4 #include <minix/libminixfs.h>
6 /* On the disk all attributes are stored in little endian format.
7 * Inode structure was taken from linux/include/linux/ext2_fs.h.
10 u16_t i_mode
; /* File mode */
11 u16_t i_uid
; /* Low 16 bits of Owner Uid */
12 u32_t i_size
; /* Size in bytes */
13 u32_t i_atime
; /* Access time */
14 u32_t i_ctime
; /* Creation time */
15 u32_t i_mtime
; /* Modification time */
16 u32_t i_dtime
; /* Deletion Time */
17 u16_t i_gid
; /* Low 16 bits of Group Id */
18 u16_t i_links_count
; /* Links count */
19 u32_t i_blocks
; /* Blocks count */
20 u32_t i_flags
; /* File flags */
31 } osd1
; /* OS dependent 1 */
32 u32_t i_block
[EXT2_N_BLOCKS
];/* Pointers to blocks */
33 u32_t i_generation
; /* File version (for NFS) */
34 u32_t i_file_acl
; /* File ACL */
35 u32_t i_dir_acl
; /* Directory ACL */
36 u32_t i_faddr
; /* Fragment address */
39 u8_t l_i_frag
; /* Fragment number */
40 u8_t l_i_fsize
; /* Fragment size */
42 u16_t l_i_uid_high
; /* these 2 fields */
43 u16_t l_i_gid_high
; /* were reserved2[0] */
47 u8_t h_i_frag
; /* Fragment number */
48 u8_t h_i_fsize
; /* Fragment size */
55 u8_t m_i_frag
; /* Fragment number */
56 u8_t m_i_fsize
; /* Fragment size */
58 u32_t m_i_reserved2
[2];
60 } osd2
; /* OS dependent 2 */
64 /* Part of on disk directory (entry description).
65 * It includes all fields except name (since size is unknown.
66 * In revision 0 name_len is u16_t (here is structure of rev >= 0.5,
67 * where name_len was truncated with the upper 8 bit to add file_type).
68 * MIN_DIR_ENTRY_SIZE depends on this structure.
70 struct ext2_disk_dir_desc
{
78 /* Current position in block */
79 #define CUR_DISC_DIR_POS(cur_desc, base) ((char*)cur_desc - (char*)base)
80 /* Return pointer to the next dentry */
81 #define NEXT_DISC_DIR_DESC(cur_desc) ((struct ext2_disk_dir_desc*)\
82 ((char*)cur_desc + cur_desc->d_rec_len))
83 /* Return next dentry's position in block */
84 #define NEXT_DISC_DIR_POS(cur_desc, base) (cur_desc->d_rec_len +\
85 CUR_DISC_DIR_POS(cur_desc, base))
86 /* Structure with options affecting global behavior. */
88 int use_orlov
; /* Bool: Use Orlov allocator */
89 /* In ext2 there are reserved blocks, which can be used by super user only or
90 * user specified by resuid/resgid. Right now we can't check what user
91 * requested operation (VFS limitation), so it's a small warkaround.
93 int mfsalloc
; /* Bool: use mfslike allocator */
94 int use_reserved_blocks
; /* Bool: small workaround */
95 unsigned int block_with_super
;/* Int: where to read super block,
97 int use_prealloc
; /* Bool: use preallocation */
101 #endif /* EXT2_TYPE_H */