blob: 7a63bd80b70089b4b9880e0a66e1d5a0464145dc [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 _UAPI_LINUX_FS_H
20#define _UAPI_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/types.h>
25#undef NR_OPEN
26#define INR_OPEN_CUR 1024
27#define INR_OPEN_MAX 4096
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define BLOCK_SIZE_BITS 10
Tao Baod7db5942015-01-28 10:07:51 -080030#define BLOCK_SIZE (1 << BLOCK_SIZE_BITS)
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define SEEK_SET 0
32#define SEEK_CUR 1
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define SEEK_END 2
35#define SEEK_DATA 3
36#define SEEK_HOLE 4
37#define SEEK_MAX SEEK_HOLE
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070039#define RENAME_NOREPLACE (1 << 0)
40#define RENAME_EXCHANGE (1 << 1)
Christopher Ferris82d75042015-01-26 10:57:07 -080041#define RENAME_WHITEOUT (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070042struct fstrim_range {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 __u64 start;
45 __u64 len;
46 __u64 minlen;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080049struct files_stat_struct {
Tao Baod7db5942015-01-28 10:07:51 -080050 unsigned long nr_files;
51 unsigned long nr_free_files;
52 unsigned long max_files;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080054};
Ben Cheng655a7c02013-10-16 16:09:24 -070055struct inodes_stat_t {
Tao Baod7db5942015-01-28 10:07:51 -080056 long nr_inodes;
57 long nr_unused;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 long dummy[5];
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
61#define NR_FILE 8192
Ben Cheng655a7c02013-10-16 16:09:24 -070062#define MS_RDONLY 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080064#define MS_NOSUID 2
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define MS_NODEV 4
66#define MS_NOEXEC 8
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define MS_SYNCHRONOUS 16
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080069#define MS_REMOUNT 32
Ben Cheng655a7c02013-10-16 16:09:24 -070070#define MS_MANDLOCK 64
71#define MS_DIRSYNC 128
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define MS_NOATIME 1024
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080074#define MS_NODIRATIME 2048
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define MS_BIND 4096
76#define MS_MOVE 8192
Ben Cheng655a7c02013-10-16 16:09:24 -070077#define MS_REC 16384
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080079#define MS_VERBOSE 32768
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define MS_SILENT 32768
Tao Baod7db5942015-01-28 10:07:51 -080081#define MS_POSIXACL (1 << 16)
82#define MS_UNBINDABLE (1 << 17)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084#define MS_PRIVATE (1 << 18)
85#define MS_SLAVE (1 << 19)
86#define MS_SHARED (1 << 20)
87#define MS_RELATIME (1 << 21)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089#define MS_KERNMOUNT (1 << 22)
90#define MS_I_VERSION (1 << 23)
91#define MS_STRICTATIME (1 << 24)
Christopher Ferris05d08e92016-02-04 13:16:38 -080092#define MS_LAZYTIME (1 << 25)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094#define MS_NOSEC (1 << 28)
Tao Baod7db5942015-01-28 10:07:51 -080095#define MS_BORN (1 << 29)
96#define MS_ACTIVE (1 << 30)
97#define MS_NOUSER (1 << 31)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define MS_RMT_MASK (MS_RDONLY | MS_SYNCHRONOUS | MS_MANDLOCK | MS_I_VERSION | MS_LAZYTIME)
Christopher Ferris82d75042015-01-26 10:57:07 -0800100#define MS_MGC_VAL 0xC0ED0000
Ben Cheng655a7c02013-10-16 16:09:24 -0700101#define MS_MGC_MSK 0xffff0000
Tao Baod7db5942015-01-28 10:07:51 -0800102#define BLKROSET _IO(0x12, 93)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800104#define BLKROGET _IO(0x12, 94)
Tao Baod7db5942015-01-28 10:07:51 -0800105#define BLKRRPART _IO(0x12, 95)
106#define BLKGETSIZE _IO(0x12, 96)
107#define BLKFLSBUF _IO(0x12, 97)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109#define BLKRASET _IO(0x12, 98)
Tao Baod7db5942015-01-28 10:07:51 -0800110#define BLKRAGET _IO(0x12, 99)
111#define BLKFRASET _IO(0x12, 100)
112#define BLKFRAGET _IO(0x12, 101)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800114#define BLKSECTSET _IO(0x12, 102)
Tao Baod7db5942015-01-28 10:07:51 -0800115#define BLKSECTGET _IO(0x12, 103)
116#define BLKSSZGET _IO(0x12, 104)
117#define BLKBSZGET _IOR(0x12, 112, size_t)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119#define BLKBSZSET _IOW(0x12, 113, size_t)
Tao Baod7db5942015-01-28 10:07:51 -0800120#define BLKGETSIZE64 _IOR(0x12, 114, size_t)
121#define BLKTRACESETUP _IOWR(0x12, 115, struct blk_user_trace_setup)
122#define BLKTRACESTART _IO(0x12, 116)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800124#define BLKTRACESTOP _IO(0x12, 117)
Tao Baod7db5942015-01-28 10:07:51 -0800125#define BLKTRACETEARDOWN _IO(0x12, 118)
126#define BLKDISCARD _IO(0x12, 119)
127#define BLKIOMIN _IO(0x12, 120)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800129#define BLKIOOPT _IO(0x12, 121)
Tao Baod7db5942015-01-28 10:07:51 -0800130#define BLKALIGNOFF _IO(0x12, 122)
131#define BLKPBSZGET _IO(0x12, 123)
132#define BLKDISCARDZEROES _IO(0x12, 124)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134#define BLKSECDISCARD _IO(0x12, 125)
Tao Baod7db5942015-01-28 10:07:51 -0800135#define BLKROTATIONAL _IO(0x12, 126)
136#define BLKZEROOUT _IO(0x12, 127)
Ben Cheng655a7c02013-10-16 16:09:24 -0700137#define BMAP_IOCTL 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139#define FIBMAP _IO(0x00, 1)
Tao Baod7db5942015-01-28 10:07:51 -0800140#define FIGETBSZ _IO(0x00, 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700141#define FIFREEZE _IOWR('X', 119, int)
142#define FITHAW _IOWR('X', 120, int)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800144#define FITRIM _IOWR('X', 121, struct fstrim_range)
Christopher Ferris82d75042015-01-26 10:57:07 -0800145#define FS_IOC_GETFLAGS _IOR('f', 1, long)
Ben Cheng655a7c02013-10-16 16:09:24 -0700146#define FS_IOC_SETFLAGS _IOW('f', 2, long)
147#define FS_IOC_GETVERSION _IOR('v', 1, long)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800149#define FS_IOC_SETVERSION _IOW('v', 2, long)
Christopher Ferris82d75042015-01-26 10:57:07 -0800150#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
Ben Cheng655a7c02013-10-16 16:09:24 -0700151#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
152#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800154#define FS_IOC32_GETVERSION _IOR('v', 1, int)
Christopher Ferris82d75042015-01-26 10:57:07 -0800155#define FS_IOC32_SETVERSION _IOW('v', 2, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700156#define FS_SECRM_FL 0x00000001
157#define FS_UNRM_FL 0x00000002
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800159#define FS_COMPR_FL 0x00000004
Christopher Ferris82d75042015-01-26 10:57:07 -0800160#define FS_SYNC_FL 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -0700161#define FS_IMMUTABLE_FL 0x00000010
162#define FS_APPEND_FL 0x00000020
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800164#define FS_NODUMP_FL 0x00000040
Christopher Ferris82d75042015-01-26 10:57:07 -0800165#define FS_NOATIME_FL 0x00000080
Ben Cheng655a7c02013-10-16 16:09:24 -0700166#define FS_DIRTY_FL 0x00000100
167#define FS_COMPRBLK_FL 0x00000200
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169#define FS_NOCOMP_FL 0x00000400
Christopher Ferris82d75042015-01-26 10:57:07 -0800170#define FS_ECOMPR_FL 0x00000800
Ben Cheng655a7c02013-10-16 16:09:24 -0700171#define FS_BTREE_FL 0x00001000
172#define FS_INDEX_FL 0x00001000
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800174#define FS_IMAGIC_FL 0x00002000
Christopher Ferris82d75042015-01-26 10:57:07 -0800175#define FS_JOURNAL_DATA_FL 0x00004000
Ben Cheng655a7c02013-10-16 16:09:24 -0700176#define FS_NOTAIL_FL 0x00008000
177#define FS_DIRSYNC_FL 0x00010000
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800179#define FS_TOPDIR_FL 0x00020000
Christopher Ferris82d75042015-01-26 10:57:07 -0800180#define FS_EXTENT_FL 0x00080000
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#define FS_DIRECTIO_FL 0x00100000
182#define FS_NOCOW_FL 0x00800000
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800184#define FS_PROJINHERIT_FL 0x20000000
185#define FS_RESERVED_FL 0x80000000
Christopher Ferris82d75042015-01-26 10:57:07 -0800186#define FS_FL_USER_VISIBLE 0x0003DFFF
Ben Cheng655a7c02013-10-16 16:09:24 -0700187#define FS_FL_USER_MODIFIABLE 0x000380FF
Christopher Ferris05d08e92016-02-04 13:16:38 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700189#define SYNC_FILE_RANGE_WAIT_BEFORE 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700190#define SYNC_FILE_RANGE_WRITE 2
Christopher Ferris82d75042015-01-26 10:57:07 -0800191#define SYNC_FILE_RANGE_WAIT_AFTER 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700192#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */