1
2
3
4
5 #ifndef _H_JFS_DINODE
6 #define _H_JFS_DINODE
7
8
9
10
11
12 #define INODESLOTSIZE 128
13 #define L2INODESLOTSIZE 7
14 #define log2INODESIZE 9
15
16
17
18
19
20
21
22 struct dinode {
23
24
25
26
27
28
29 __le32 di_inostamp;
30 __le32 di_fileset;
31 __le32 di_number;
32 __le32 di_gen;
33
34 pxd_t di_ixpxd;
35
36 __le64 di_size;
37 __le64 di_nblocks;
38
39 __le32 di_nlink;
40
41 __le32 di_uid;
42 __le32 di_gid;
43
44 __le32 di_mode;
45
46 struct timestruc_t di_atime;
47 struct timestruc_t di_ctime;
48 struct timestruc_t di_mtime;
49 struct timestruc_t di_otime;
50
51 dxd_t di_acl;
52
53 dxd_t di_ea;
54
55 __le32 di_next_index;
56
57 __le32 di_acltype;
58
59
60
61
62
63
64
65
66
67
68
69
70
71 union {
72 struct {
73
74
75
76
77
78
79 struct dir_table_slot _table[12];
80
81 dtroot_t _dtroot;
82 } _dir;
83 #define di_dirtable u._dir._table
84 #define di_dtroot u._dir._dtroot
85 #define di_parent di_dtroot.header.idotdot
86 #define di_DASD di_dtroot.header.DASD
87
88 struct {
89 union {
90 u8 _data[96];
91 struct {
92 void *_imap;
93 __le32 _gengen;
94 } _imap;
95 } _u1;
96 #define di_gengen u._file._u1._imap._gengen
97
98 union {
99 xtpage_t _xtroot;
100 struct {
101 u8 unused[16];
102 dxd_t _dxd;
103 union {
104 __le32 _rdev;
105
106
107
108
109
110
111
112 u8 _fastsymlink[128];
113 } _u;
114 u8 _inlineea[128];
115 } _special;
116 } _u2;
117 } _file;
118 #define di_xtroot u._file._u2._xtroot
119 #define di_dxd u._file._u2._special._dxd
120 #define di_btroot di_xtroot
121 #define di_inlinedata u._file._u2._special._u
122 #define di_rdev u._file._u2._special._u._rdev
123 #define di_fastsymlink u._file._u2._special._u._fastsymlink
124 #define di_inlineea u._file._u2._special._inlineea
125 } u;
126 };
127
128
129 #define IFJOURNAL 0x00010000
130 #define ISPARSE 0x00020000
131 #define INLINEEA 0x00040000
132 #define ISWAPFILE 0x00800000
133
134
135 #define IREADONLY 0x02000000
136 #define IHIDDEN 0x04000000
137 #define ISYSTEM 0x08000000
138
139 #define IDIRECTORY 0x20000000
140 #define IARCHIVE 0x40000000
141 #define INEWNAME 0x80000000
142
143 #define IRASH 0x4E000000
144 #define ATTRSHIFT 25
145
146
147
148
149 #define JFS_NOATIME_FL 0x00080000
150
151 #define JFS_DIRSYNC_FL 0x00100000
152 #define JFS_SYNC_FL 0x00200000
153 #define JFS_SECRM_FL 0x00400000
154 #define JFS_UNRM_FL 0x00800000
155
156 #define JFS_APPEND_FL 0x01000000
157 #define JFS_IMMUTABLE_FL 0x02000000
158
159 #define JFS_FL_USER_VISIBLE 0x03F80000
160 #define JFS_FL_USER_MODIFIABLE 0x03F80000
161 #define JFS_FL_INHERIT 0x03C80000
162
163
164 #define JFS_IOC_GETFLAGS _IOR('f', 1, long)
165 #define JFS_IOC_SETFLAGS _IOW('f', 2, long)
166
167 #define JFS_IOC_GETFLAGS32 _IOR('f', 1, int)
168 #define JFS_IOC_SETFLAGS32 _IOW('f', 2, int)
169
170 #endif