122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI_LINUX_FS_H
2022851890Sopenharmony_ci#define _UAPI_LINUX_FS_H
2122851890Sopenharmony_ci#include <linux/limits.h>
2222851890Sopenharmony_ci#include <linux/ioctl.h>
2322851890Sopenharmony_ci#include <linux/types.h>
2422851890Sopenharmony_ci#include <linux/fscrypt.h>
2522851890Sopenharmony_ci#include <linux/mount.h>
2622851890Sopenharmony_ci#undef NR_OPEN
2722851890Sopenharmony_ci#define INR_OPEN_CUR 1024
2822851890Sopenharmony_ci#define INR_OPEN_MAX 4096
2922851890Sopenharmony_ci#define BLOCK_SIZE_BITS 10
3022851890Sopenharmony_ci#define BLOCK_SIZE (1 << BLOCK_SIZE_BITS)
3122851890Sopenharmony_ci#define SEEK_SET 0
3222851890Sopenharmony_ci#define SEEK_CUR 1
3322851890Sopenharmony_ci#define SEEK_END 2
3422851890Sopenharmony_ci#define SEEK_DATA 3
3522851890Sopenharmony_ci#define SEEK_HOLE 4
3622851890Sopenharmony_ci#define SEEK_MAX SEEK_HOLE
3722851890Sopenharmony_ci#define RENAME_NOREPLACE (1 << 0)
3822851890Sopenharmony_ci#define RENAME_EXCHANGE (1 << 1)
3922851890Sopenharmony_ci#define RENAME_WHITEOUT (1 << 2)
4022851890Sopenharmony_cistruct file_clone_range {
4122851890Sopenharmony_ci  __s64 src_fd;
4222851890Sopenharmony_ci  __u64 src_offset;
4322851890Sopenharmony_ci  __u64 src_length;
4422851890Sopenharmony_ci  __u64 dest_offset;
4522851890Sopenharmony_ci};
4622851890Sopenharmony_cistruct fstrim_range {
4722851890Sopenharmony_ci  __u64 start;
4822851890Sopenharmony_ci  __u64 len;
4922851890Sopenharmony_ci  __u64 minlen;
5022851890Sopenharmony_ci};
5122851890Sopenharmony_ci#define FILE_DEDUPE_RANGE_SAME 0
5222851890Sopenharmony_ci#define FILE_DEDUPE_RANGE_DIFFERS 1
5322851890Sopenharmony_cistruct file_dedupe_range_info {
5422851890Sopenharmony_ci  __s64 dest_fd;
5522851890Sopenharmony_ci  __u64 dest_offset;
5622851890Sopenharmony_ci  __u64 bytes_deduped;
5722851890Sopenharmony_ci  __s32 status;
5822851890Sopenharmony_ci  __u32 reserved;
5922851890Sopenharmony_ci};
6022851890Sopenharmony_cistruct file_dedupe_range {
6122851890Sopenharmony_ci  __u64 src_offset;
6222851890Sopenharmony_ci  __u64 src_length;
6322851890Sopenharmony_ci  __u16 dest_count;
6422851890Sopenharmony_ci  __u16 reserved1;
6522851890Sopenharmony_ci  __u32 reserved2;
6622851890Sopenharmony_ci  struct file_dedupe_range_info info[0];
6722851890Sopenharmony_ci};
6822851890Sopenharmony_cistruct files_stat_struct {
6922851890Sopenharmony_ci  unsigned long nr_files;
7022851890Sopenharmony_ci  unsigned long nr_free_files;
7122851890Sopenharmony_ci  unsigned long max_files;
7222851890Sopenharmony_ci};
7322851890Sopenharmony_cistruct inodes_stat_t {
7422851890Sopenharmony_ci  long nr_inodes;
7522851890Sopenharmony_ci  long nr_unused;
7622851890Sopenharmony_ci  long dummy[5];
7722851890Sopenharmony_ci};
7822851890Sopenharmony_ci#define NR_FILE 8192
7922851890Sopenharmony_cistruct fsxattr {
8022851890Sopenharmony_ci  __u32 fsx_xflags;
8122851890Sopenharmony_ci  __u32 fsx_extsize;
8222851890Sopenharmony_ci  __u32 fsx_nextents;
8322851890Sopenharmony_ci  __u32 fsx_projid;
8422851890Sopenharmony_ci  __u32 fsx_cowextsize;
8522851890Sopenharmony_ci  unsigned char fsx_pad[8];
8622851890Sopenharmony_ci};
8722851890Sopenharmony_ci#define FS_XFLAG_REALTIME 0x00000001
8822851890Sopenharmony_ci#define FS_XFLAG_PREALLOC 0x00000002
8922851890Sopenharmony_ci#define FS_XFLAG_IMMUTABLE 0x00000008
9022851890Sopenharmony_ci#define FS_XFLAG_APPEND 0x00000010
9122851890Sopenharmony_ci#define FS_XFLAG_SYNC 0x00000020
9222851890Sopenharmony_ci#define FS_XFLAG_NOATIME 0x00000040
9322851890Sopenharmony_ci#define FS_XFLAG_NODUMP 0x00000080
9422851890Sopenharmony_ci#define FS_XFLAG_RTINHERIT 0x00000100
9522851890Sopenharmony_ci#define FS_XFLAG_PROJINHERIT 0x00000200
9622851890Sopenharmony_ci#define FS_XFLAG_NOSYMLINKS 0x00000400
9722851890Sopenharmony_ci#define FS_XFLAG_EXTSIZE 0x00000800
9822851890Sopenharmony_ci#define FS_XFLAG_EXTSZINHERIT 0x00001000
9922851890Sopenharmony_ci#define FS_XFLAG_NODEFRAG 0x00002000
10022851890Sopenharmony_ci#define FS_XFLAG_FILESTREAM 0x00004000
10122851890Sopenharmony_ci#define FS_XFLAG_DAX 0x00008000
10222851890Sopenharmony_ci#define FS_XFLAG_COWEXTSIZE 0x00010000
10322851890Sopenharmony_ci#define FS_XFLAG_HASATTR 0x80000000
10422851890Sopenharmony_ci#define BLKROSET _IO(0x12, 93)
10522851890Sopenharmony_ci#define BLKROGET _IO(0x12, 94)
10622851890Sopenharmony_ci#define BLKRRPART _IO(0x12, 95)
10722851890Sopenharmony_ci#define BLKGETSIZE _IO(0x12, 96)
10822851890Sopenharmony_ci#define BLKFLSBUF _IO(0x12, 97)
10922851890Sopenharmony_ci#define BLKRASET _IO(0x12, 98)
11022851890Sopenharmony_ci#define BLKRAGET _IO(0x12, 99)
11122851890Sopenharmony_ci#define BLKFRASET _IO(0x12, 100)
11222851890Sopenharmony_ci#define BLKFRAGET _IO(0x12, 101)
11322851890Sopenharmony_ci#define BLKSECTSET _IO(0x12, 102)
11422851890Sopenharmony_ci#define BLKSECTGET _IO(0x12, 103)
11522851890Sopenharmony_ci#define BLKSSZGET _IO(0x12, 104)
11622851890Sopenharmony_ci#define BLKBSZGET _IOR(0x12, 112, size_t)
11722851890Sopenharmony_ci#define BLKBSZSET _IOW(0x12, 113, size_t)
11822851890Sopenharmony_ci#define BLKGETSIZE64 _IOR(0x12, 114, size_t)
11922851890Sopenharmony_ci#define BLKTRACESETUP _IOWR(0x12, 115, struct blk_user_trace_setup)
12022851890Sopenharmony_ci#define BLKTRACESTART _IO(0x12, 116)
12122851890Sopenharmony_ci#define BLKTRACESTOP _IO(0x12, 117)
12222851890Sopenharmony_ci#define BLKTRACETEARDOWN _IO(0x12, 118)
12322851890Sopenharmony_ci#define BLKDISCARD _IO(0x12, 119)
12422851890Sopenharmony_ci#define BLKIOMIN _IO(0x12, 120)
12522851890Sopenharmony_ci#define BLKIOOPT _IO(0x12, 121)
12622851890Sopenharmony_ci#define BLKALIGNOFF _IO(0x12, 122)
12722851890Sopenharmony_ci#define BLKPBSZGET _IO(0x12, 123)
12822851890Sopenharmony_ci#define BLKDISCARDZEROES _IO(0x12, 124)
12922851890Sopenharmony_ci#define BLKSECDISCARD _IO(0x12, 125)
13022851890Sopenharmony_ci#define BLKROTATIONAL _IO(0x12, 126)
13122851890Sopenharmony_ci#define BLKZEROOUT _IO(0x12, 127)
13222851890Sopenharmony_ci#define BMAP_IOCTL 1
13322851890Sopenharmony_ci#define FIBMAP _IO(0x00, 1)
13422851890Sopenharmony_ci#define FIGETBSZ _IO(0x00, 2)
13522851890Sopenharmony_ci#define FIFREEZE _IOWR('X', 119, int)
13622851890Sopenharmony_ci#define FITHAW _IOWR('X', 120, int)
13722851890Sopenharmony_ci#define FITRIM _IOWR('X', 121, struct fstrim_range)
13822851890Sopenharmony_ci#define FICLONE _IOW(0x94, 9, int)
13922851890Sopenharmony_ci#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range)
14022851890Sopenharmony_ci#define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range)
14122851890Sopenharmony_ci#define FSLABEL_MAX 256
14222851890Sopenharmony_ci#define FS_IOC_GETFLAGS _IOR('f', 1, long)
14322851890Sopenharmony_ci#define FS_IOC_SETFLAGS _IOW('f', 2, long)
14422851890Sopenharmony_ci#define FS_IOC_GETVERSION _IOR('v', 1, long)
14522851890Sopenharmony_ci#define FS_IOC_SETVERSION _IOW('v', 2, long)
14622851890Sopenharmony_ci#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
14722851890Sopenharmony_ci#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
14822851890Sopenharmony_ci#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
14922851890Sopenharmony_ci#define FS_IOC32_GETVERSION _IOR('v', 1, int)
15022851890Sopenharmony_ci#define FS_IOC32_SETVERSION _IOW('v', 2, int)
15122851890Sopenharmony_ci#define FS_IOC_FSGETXATTR _IOR('X', 31, struct fsxattr)
15222851890Sopenharmony_ci#define FS_IOC_FSSETXATTR _IOW('X', 32, struct fsxattr)
15322851890Sopenharmony_ci#define FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX])
15422851890Sopenharmony_ci#define FS_IOC_SETFSLABEL _IOW(0x94, 50, char[FSLABEL_MAX])
15522851890Sopenharmony_ci#define FS_SECRM_FL 0x00000001
15622851890Sopenharmony_ci#define FS_UNRM_FL 0x00000002
15722851890Sopenharmony_ci#define FS_COMPR_FL 0x00000004
15822851890Sopenharmony_ci#define FS_SYNC_FL 0x00000008
15922851890Sopenharmony_ci#define FS_IMMUTABLE_FL 0x00000010
16022851890Sopenharmony_ci#define FS_APPEND_FL 0x00000020
16122851890Sopenharmony_ci#define FS_NODUMP_FL 0x00000040
16222851890Sopenharmony_ci#define FS_NOATIME_FL 0x00000080
16322851890Sopenharmony_ci#define FS_DIRTY_FL 0x00000100
16422851890Sopenharmony_ci#define FS_COMPRBLK_FL 0x00000200
16522851890Sopenharmony_ci#define FS_NOCOMP_FL 0x00000400
16622851890Sopenharmony_ci#define FS_ENCRYPT_FL 0x00000800
16722851890Sopenharmony_ci#define FS_BTREE_FL 0x00001000
16822851890Sopenharmony_ci#define FS_INDEX_FL 0x00001000
16922851890Sopenharmony_ci#define FS_IMAGIC_FL 0x00002000
17022851890Sopenharmony_ci#define FS_JOURNAL_DATA_FL 0x00004000
17122851890Sopenharmony_ci#define FS_NOTAIL_FL 0x00008000
17222851890Sopenharmony_ci#define FS_DIRSYNC_FL 0x00010000
17322851890Sopenharmony_ci#define FS_TOPDIR_FL 0x00020000
17422851890Sopenharmony_ci#define FS_HUGE_FILE_FL 0x00040000
17522851890Sopenharmony_ci#define FS_EXTENT_FL 0x00080000
17622851890Sopenharmony_ci#define FS_VERITY_FL 0x00100000
17722851890Sopenharmony_ci#define FS_EA_INODE_FL 0x00200000
17822851890Sopenharmony_ci#define FS_EOFBLOCKS_FL 0x00400000
17922851890Sopenharmony_ci#define FS_NOCOW_FL 0x00800000
18022851890Sopenharmony_ci#define FS_DAX_FL 0x02000000
18122851890Sopenharmony_ci#define FS_INLINE_DATA_FL 0x10000000
18222851890Sopenharmony_ci#define FS_PROJINHERIT_FL 0x20000000
18322851890Sopenharmony_ci#define FS_CASEFOLD_FL 0x40000000
18422851890Sopenharmony_ci#define FS_RESERVED_FL 0x80000000
18522851890Sopenharmony_ci#define FS_FL_USER_VISIBLE 0x0003DFFF
18622851890Sopenharmony_ci#define FS_FL_USER_MODIFIABLE 0x000380FF
18722851890Sopenharmony_ci#define SYNC_FILE_RANGE_WAIT_BEFORE 1
18822851890Sopenharmony_ci#define SYNC_FILE_RANGE_WRITE 2
18922851890Sopenharmony_ci#define SYNC_FILE_RANGE_WAIT_AFTER 4
19022851890Sopenharmony_ci#define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WAIT_AFTER)
19122851890Sopenharmony_citypedef int __bitwise __kernel_rwf_t;
19222851890Sopenharmony_ci#define RWF_HIPRI ((__force __kernel_rwf_t) 0x00000001)
19322851890Sopenharmony_ci#define RWF_DSYNC ((__force __kernel_rwf_t) 0x00000002)
19422851890Sopenharmony_ci#define RWF_SYNC ((__force __kernel_rwf_t) 0x00000004)
19522851890Sopenharmony_ci#define RWF_NOWAIT ((__force __kernel_rwf_t) 0x00000008)
19622851890Sopenharmony_ci#define RWF_APPEND ((__force __kernel_rwf_t) 0x00000010)
19722851890Sopenharmony_ci#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT | RWF_APPEND)
19822851890Sopenharmony_ci#endif
199