xref: /aosp_15_r20/bionic/libc/kernel/uapi/linux/f2fs.h (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1*8d67ca89SAndroid Build Coastguard Worker /*
2*8d67ca89SAndroid Build Coastguard Worker  * This file is auto-generated. Modifications will be lost.
3*8d67ca89SAndroid Build Coastguard Worker  *
4*8d67ca89SAndroid Build Coastguard Worker  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5*8d67ca89SAndroid Build Coastguard Worker  * for more information.
6*8d67ca89SAndroid Build Coastguard Worker  */
7*8d67ca89SAndroid Build Coastguard Worker #ifndef _UAPI_LINUX_F2FS_H
8*8d67ca89SAndroid Build Coastguard Worker #define _UAPI_LINUX_F2FS_H
9*8d67ca89SAndroid Build Coastguard Worker #include <linux/types.h>
10*8d67ca89SAndroid Build Coastguard Worker #include <linux/ioctl.h>
11*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOCTL_MAGIC 0xf5
12*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_START_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 1)
13*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2)
14*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3)
15*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_RELEASE_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 4)
16*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_ABORT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 5)
17*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_GARBAGE_COLLECT _IOW(F2FS_IOCTL_MAGIC, 6, __u32)
18*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7)
19*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_DEFRAGMENT _IOWR(F2FS_IOCTL_MAGIC, 8, struct f2fs_defragment)
20*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_MOVE_RANGE _IOWR(F2FS_IOCTL_MAGIC, 9, struct f2fs_move_range)
21*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_FLUSH_DEVICE _IOW(F2FS_IOCTL_MAGIC, 10, struct f2fs_flush_device)
22*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_GARBAGE_COLLECT_RANGE _IOW(F2FS_IOCTL_MAGIC, 11, struct f2fs_gc_range)
23*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, __u32)
24*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_SET_PIN_FILE _IOW(F2FS_IOCTL_MAGIC, 13, __u32)
25*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_GET_PIN_FILE _IOR(F2FS_IOCTL_MAGIC, 14, __u32)
26*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_PRECACHE_EXTENTS _IO(F2FS_IOCTL_MAGIC, 15)
27*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_RESIZE_FS _IOW(F2FS_IOCTL_MAGIC, 16, __u64)
28*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_GET_COMPRESS_BLOCKS _IOR(F2FS_IOCTL_MAGIC, 17, __u64)
29*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_RELEASE_COMPRESS_BLOCKS _IOR(F2FS_IOCTL_MAGIC, 18, __u64)
30*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_RESERVE_COMPRESS_BLOCKS _IOR(F2FS_IOCTL_MAGIC, 19, __u64)
31*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_SEC_TRIM_FILE _IOW(F2FS_IOCTL_MAGIC, 20, struct f2fs_sectrim_range)
32*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_GET_COMPRESS_OPTION _IOR(F2FS_IOCTL_MAGIC, 21, struct f2fs_comp_option)
33*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_SET_COMPRESS_OPTION _IOW(F2FS_IOCTL_MAGIC, 22, struct f2fs_comp_option)
34*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_DECOMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 23)
35*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_COMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 24)
36*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25)
37*8d67ca89SAndroid Build Coastguard Worker #define F2FS_IOC_SHUTDOWN _IOR('X', 125, __u32)
38*8d67ca89SAndroid Build Coastguard Worker #define F2FS_GOING_DOWN_FULLSYNC 0x0
39*8d67ca89SAndroid Build Coastguard Worker #define F2FS_GOING_DOWN_METASYNC 0x1
40*8d67ca89SAndroid Build Coastguard Worker #define F2FS_GOING_DOWN_NOSYNC 0x2
41*8d67ca89SAndroid Build Coastguard Worker #define F2FS_GOING_DOWN_METAFLUSH 0x3
42*8d67ca89SAndroid Build Coastguard Worker #define F2FS_GOING_DOWN_NEED_FSCK 0x4
43*8d67ca89SAndroid Build Coastguard Worker #define F2FS_TRIM_FILE_DISCARD 0x1
44*8d67ca89SAndroid Build Coastguard Worker #define F2FS_TRIM_FILE_ZEROOUT 0x2
45*8d67ca89SAndroid Build Coastguard Worker #define F2FS_TRIM_FILE_MASK 0x3
46*8d67ca89SAndroid Build Coastguard Worker struct f2fs_gc_range {
47*8d67ca89SAndroid Build Coastguard Worker   __u32 sync;
48*8d67ca89SAndroid Build Coastguard Worker   __u64 start;
49*8d67ca89SAndroid Build Coastguard Worker   __u64 len;
50*8d67ca89SAndroid Build Coastguard Worker };
51*8d67ca89SAndroid Build Coastguard Worker struct f2fs_defragment {
52*8d67ca89SAndroid Build Coastguard Worker   __u64 start;
53*8d67ca89SAndroid Build Coastguard Worker   __u64 len;
54*8d67ca89SAndroid Build Coastguard Worker };
55*8d67ca89SAndroid Build Coastguard Worker struct f2fs_move_range {
56*8d67ca89SAndroid Build Coastguard Worker   __u32 dst_fd;
57*8d67ca89SAndroid Build Coastguard Worker   __u64 pos_in;
58*8d67ca89SAndroid Build Coastguard Worker   __u64 pos_out;
59*8d67ca89SAndroid Build Coastguard Worker   __u64 len;
60*8d67ca89SAndroid Build Coastguard Worker };
61*8d67ca89SAndroid Build Coastguard Worker struct f2fs_flush_device {
62*8d67ca89SAndroid Build Coastguard Worker   __u32 dev_num;
63*8d67ca89SAndroid Build Coastguard Worker   __u32 segments;
64*8d67ca89SAndroid Build Coastguard Worker };
65*8d67ca89SAndroid Build Coastguard Worker struct f2fs_sectrim_range {
66*8d67ca89SAndroid Build Coastguard Worker   __u64 start;
67*8d67ca89SAndroid Build Coastguard Worker   __u64 len;
68*8d67ca89SAndroid Build Coastguard Worker   __u64 flags;
69*8d67ca89SAndroid Build Coastguard Worker };
70*8d67ca89SAndroid Build Coastguard Worker struct f2fs_comp_option {
71*8d67ca89SAndroid Build Coastguard Worker   __u8 algorithm;
72*8d67ca89SAndroid Build Coastguard Worker   __u8 log_cluster_size;
73*8d67ca89SAndroid Build Coastguard Worker };
74*8d67ca89SAndroid Build Coastguard Worker #endif
75