• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _LINUX_FS_H
20 #define _LINUX_FS_H
21 #include <linux/limits.h>
22 #include <linux/ioctl.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <linux/blk_types.h>
25 #include <linux/types.h>
26 #undef NR_OPEN
27 #define INR_OPEN_CUR 1024
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define INR_OPEN_MAX 4096
30 #define BLOCK_SIZE_BITS 10
31 #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
32 #define SEEK_SET 0
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define SEEK_CUR 1
35 #define SEEK_END 2
36 #define SEEK_MAX SEEK_END
37 struct fstrim_range {
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  __u64 start;
40  __u64 len;
41  __u64 minlen;
42 };
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 struct files_stat_struct {
45  unsigned long nr_files;
46  unsigned long nr_free_files;
47  unsigned long max_files;
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 };
50 struct inodes_stat_t {
51  int nr_inodes;
52  int nr_unused;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  int dummy[5];
55 };
56 #define NR_FILE 8192
57 #define MAY_EXEC 1
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define MAY_WRITE 2
60 #define MAY_READ 4
61 #define MAY_APPEND 8
62 #define MAY_ACCESS 16
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define MAY_OPEN 32
65 #define MAY_CHDIR 64
66 #define FMODE_READ ((__force fmode_t)0x1)
67 #define FMODE_WRITE ((__force fmode_t)0x2)
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define FMODE_LSEEK ((__force fmode_t)0x4)
70 #define FMODE_PREAD ((__force fmode_t)0x8)
71 #define FMODE_PWRITE ((__force fmode_t)0x10)
72 #define FMODE_EXEC ((__force fmode_t)0x20)
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define FMODE_NDELAY ((__force fmode_t)0x40)
75 #define FMODE_EXCL ((__force fmode_t)0x80)
76 #define FMODE_WRITE_IOCTL ((__force fmode_t)0x100)
77 #define FMODE_NOCMTIME ((__force fmode_t)0x800)
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define FMODE_RANDOM ((__force fmode_t)0x1000)
80 #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000)
81 #define FMODE_PATH ((__force fmode_t)0x4000)
82 #define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define RW_MASK REQ_WRITE
85 #define RWA_MASK REQ_RAHEAD
86 #define READ 0
87 #define WRITE RW_MASK
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define READA RWA_MASK
90 #define READ_SYNC (READ | REQ_SYNC)
91 #define READ_META (READ | REQ_META)
92 #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE)
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define WRITE_ODIRECT (WRITE | REQ_SYNC)
95 #define WRITE_META (WRITE | REQ_META)
96 #define WRITE_FLUSH (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH)
97 #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA)
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
100 #define SEL_IN 1
101 #define SEL_OUT 2
102 #define SEL_EX 4
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define FS_REQUIRES_DEV 1
105 #define FS_BINARY_MOUNTDATA 2
106 #define FS_HAS_SUBTYPE 4
107 #define FS_REVAL_DOT 16384
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define FS_RENAME_DOES_D_MOVE 32768
110 #define MS_RDONLY 1
111 #define MS_NOSUID 2
112 #define MS_NODEV 4
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define MS_NOEXEC 8
115 #define MS_SYNCHRONOUS 16
116 #define MS_REMOUNT 32
117 #define MS_MANDLOCK 64
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #define MS_DIRSYNC 128
120 #define MS_NOATIME 1024
121 #define MS_NODIRATIME 2048
122 #define MS_BIND 4096
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define MS_MOVE 8192
125 #define MS_REC 16384
126 #define MS_VERBOSE 32768
127 #define MS_SILENT 32768
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define MS_POSIXACL (1<<16)
130 #define MS_UNBINDABLE (1<<17)
131 #define MS_PRIVATE (1<<18)
132 #define MS_SLAVE (1<<19)
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define MS_SHARED (1<<20)
135 #define MS_RELATIME (1<<21)
136 #define MS_KERNMOUNT (1<<22)
137 #define MS_I_VERSION (1<<23)
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 #define MS_STRICTATIME (1<<24)
140 #define MS_NOSEC (1<<28)
141 #define MS_BORN (1<<29)
142 #define MS_ACTIVE (1<<30)
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 #define MS_NOUSER (1<<31)
145 #define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
146 #define MS_MGC_VAL 0xC0ED0000
147 #define MS_MGC_MSK 0xffff0000
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 #define S_SYNC 1
150 #define S_NOATIME 2
151 #define S_APPEND 4
152 #define S_IMMUTABLE 8
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #define S_DEAD 16
155 #define S_NOQUOTA 32
156 #define S_DIRSYNC 64
157 #define S_NOCMTIME 128
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define S_SWAPFILE 256
160 #define S_PRIVATE 512
161 #define S_IMA 1024
162 #define S_AUTOMOUNT 2048
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define S_NOSEC 4096
165 #define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
166 #define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
167 #define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) ||   ((inode)->i_flags & S_SYNC))
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) ||   ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
170 #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
171 #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
172 #define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION)
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
175 #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
176 #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
177 #define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL)
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD)
180 #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
181 #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
182 #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 #define IS_IMA(inode) ((inode)->i_flags & S_IMA)
185 #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
186 #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
187 #define BLKROSET _IO(0x12,93)
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 #define BLKROGET _IO(0x12,94)
190 #define BLKRRPART _IO(0x12,95)
191 #define BLKGETSIZE _IO(0x12,96)
192 #define BLKFLSBUF _IO(0x12,97)
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 #define BLKRASET _IO(0x12,98)
195 #define BLKRAGET _IO(0x12,99)
196 #define BLKFRASET _IO(0x12,100)
197 #define BLKFRAGET _IO(0x12,101)
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 #define BLKSECTSET _IO(0x12,102)
200 #define BLKSECTGET _IO(0x12,103)
201 #define BLKSSZGET _IO(0x12,104)
202 #define BLKBSZGET _IOR(0x12,112,size_t)
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 #define BLKBSZSET _IOW(0x12,113,size_t)
205 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
206 #define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
207 #define BLKTRACESTART _IO(0x12,116)
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define BLKTRACESTOP _IO(0x12,117)
210 #define BLKTRACETEARDOWN _IO(0x12,118)
211 #define BLKDISCARD _IO(0x12,119)
212 #define BLKIOMIN _IO(0x12,120)
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define BLKIOOPT _IO(0x12,121)
215 #define BLKALIGNOFF _IO(0x12,122)
216 #define BLKPBSZGET _IO(0x12,123)
217 #define BLKDISCARDZEROES _IO(0x12,124)
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define BLKSECDISCARD _IO(0x12,125)
220 #define BMAP_IOCTL 1
221 #define FIBMAP _IO(0x00,1)
222 #define FIGETBSZ _IO(0x00,2)
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define FIFREEZE _IOWR('X', 119, int)
225 #define FITHAW _IOWR('X', 120, int)
226 #define FITRIM _IOWR('X', 121, struct fstrim_range)
227 #define FS_IOC_GETFLAGS _IOR('f', 1, long)
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define FS_IOC_SETFLAGS _IOW('f', 2, long)
230 #define FS_IOC_GETVERSION _IOR('v', 1, long)
231 #define FS_IOC_SETVERSION _IOW('v', 2, long)
232 #define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define FS_IOC32_GETFLAGS _IOR('f', 1, int)
235 #define FS_IOC32_SETFLAGS _IOW('f', 2, int)
236 #define FS_IOC32_GETVERSION _IOR('v', 1, int)
237 #define FS_IOC32_SETVERSION _IOW('v', 2, int)
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 #define FS_SECRM_FL 0x00000001
240 #define FS_UNRM_FL 0x00000002
241 #define FS_COMPR_FL 0x00000004
242 #define FS_SYNC_FL 0x00000008
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 #define FS_IMMUTABLE_FL 0x00000010
245 #define FS_APPEND_FL 0x00000020
246 #define FS_NODUMP_FL 0x00000040
247 #define FS_NOATIME_FL 0x00000080
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 #define FS_DIRTY_FL 0x00000100
250 #define FS_COMPRBLK_FL 0x00000200
251 #define FS_NOCOMP_FL 0x00000400
252 #define FS_ECOMPR_FL 0x00000800
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 #define FS_BTREE_FL 0x00001000
255 #define FS_INDEX_FL 0x00001000
256 #define FS_IMAGIC_FL 0x00002000
257 #define FS_JOURNAL_DATA_FL 0x00004000
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 #define FS_NOTAIL_FL 0x00008000
260 #define FS_DIRSYNC_FL 0x00010000
261 #define FS_TOPDIR_FL 0x00020000
262 #define FS_EXTENT_FL 0x00080000
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 #define FS_DIRECTIO_FL 0x00100000
265 #define FS_NOCOW_FL 0x00800000
266 #define FS_RESERVED_FL 0x80000000
267 #define FS_FL_USER_VISIBLE 0x0003DFFF
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 #define FS_FL_USER_MODIFIABLE 0x000380FF
270 #define SYNC_FILE_RANGE_WAIT_BEFORE 1
271 #define SYNC_FILE_RANGE_WRITE 2
272 #define SYNC_FILE_RANGE_WAIT_AFTER 4
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 #endif
275