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