4 /* On the disk all attributes are stored in little endian format.
5 * Inode structure was taken from linux/include/linux/ext2_fs.h.
8 u16_t i_mode
; /* File mode */
9 u16_t i_uid
; /* Low 16 bits of Owner Uid */
10 u32_t i_size
; /* Size in bytes */
11 u32_t i_atime
; /* Access time */
12 u32_t i_ctime
; /* Creation time */
13 u32_t i_mtime
; /* Modification time */
14 u32_t i_dtime
; /* Deletion Time */
15 u16_t i_gid
; /* Low 16 bits of Group Id */
16 u16_t i_links_count
; /* Links count */
17 u32_t i_blocks
; /* Blocks count */
18 u32_t i_flags
; /* File flags */
29 } osd1
; /* OS dependent 1 */
30 u32_t i_block
[EXT2_N_BLOCKS
];/* Pointers to blocks */
31 u32_t i_generation
; /* File version (for NFS) */
32 u32_t i_file_acl
; /* File ACL */
33 u32_t i_dir_acl
; /* Directory ACL */
34 u32_t i_faddr
; /* Fragment address */
37 u8_t l_i_frag
; /* Fragment number */
38 u8_t l_i_fsize
; /* Fragment size */
40 u16_t l_i_uid_high
; /* these 2 fields */
41 u16_t l_i_gid_high
; /* were reserved2[0] */
45 u8_t h_i_frag
; /* Fragment number */
46 u8_t h_i_fsize
; /* Fragment size */
53 u8_t m_i_frag
; /* Fragment number */
54 u8_t m_i_fsize
; /* Fragment size */
56 u32_t m_i_reserved2
[2];
58 } osd2
; /* OS dependent 2 */
62 /* Part of on disk directory (entry description).
63 * It includes all fields except name (since size is unknown.
64 * In revision 0 name_len is u16_t (here is structure of rev >= 0.5,
65 * where name_len was truncated with the upper 8 bit to add file_type).
66 * MIN_DIR_ENTRY_SIZE depends on this structure.
68 struct ext2_disk_dir_desc
{
76 /* Current position in block */
77 #define CUR_DISC_DIR_POS(cur_desc, base) ((char*)cur_desc - (char*)base)
78 /* Return pointer to the next dentry */
79 #define NEXT_DISC_DIR_DESC(cur_desc) ((struct ext2_disk_dir_desc*)\
80 ((char*)cur_desc + cur_desc->d_rec_len))
81 /* Return next dentry's position in block */
82 #define NEXT_DISC_DIR_POS(cur_desc, base) (cur_desc->d_rec_len +\
83 CUR_DISC_DIR_POS(cur_desc, base))
86 /* Data portion of the buffer. */
89 /* Header portion of the buffer. */
90 struct buf
*b_next
; /* used to link all free bufs in a chain */
91 struct buf
*b_prev
; /* used to link all free bufs the other way */
92 struct buf
*b_hash
; /* used to link bufs on hash chains */
93 block_t b_blocknr
; /* block number of its (minor) device */
94 dev_t b_dev
; /* major | minor device where block resides */
95 char b_dirt
; /* CLEAN or DIRTY */
96 char b_count
; /* number of users of this buffer */
97 unsigned int b_bytes
; /* Number of bytes allocated in bp */
101 /* Structure with options affecting global behavior. */
103 int use_orlov
; /* Bool: Use Orlov allocator */
104 /* In ext2 there are reserved blocks, which can be used by super user only or
105 * user specified by resuid/resgid. Right now we can't check what user
106 * requested operation (VFS limitation), so it's a small warkaround.
108 int mfsalloc
; /* Bool: use mfslike allocator */
109 int use_reserved_blocks
; /* Bool: small workaround */
110 unsigned int block_with_super
;/* Int: where to read super block,
112 int use_prealloc
; /* Bool: use preallocation */
116 #endif /* EXT2_TYPE_H */