aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/fs_ioctl.txt
blob: 49abb6c01e1a546ec900cd97e9410a971aebad2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Copyright 2018 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

include <uapi/linux/fiemap.h>
include <uapi/linux/fs.h>
include <uapi/linux/fsmap.h>
include <linux/falloc.h>

ioctl$FIBMAP(fd fd, cmd const[FIBMAP], arg ptr[in, int32])
ioctl$FIGETBSZ(fd fd, cmd const[FIGETBSZ], arg ptr[out, intptr])
ioctl$FITRIM(fd fd, cmd const[FITRIM], arg ptr[in, fstrim_range])
ioctl$FICLONE(fd fd, cmd const[FICLONE], arg fd)
ioctl$FICLONERANGE(fd fd, cmd const[FICLONERANGE], arg ptr[in, file_clone_range])
ioctl$FIDEDUPERANGE(fd fd, cmd const[FIDEDUPERANGE], arg ptr[in, file_dedupe_range])

ioctl$FS_IOC_GETFLAGS(fd fd, cmd const[FS_IOC_GETFLAGS], arg ptr[out, intptr])
ioctl$FS_IOC_SETFLAGS(fd fd, cmd const[FS_IOC_SETFLAGS], arg ptr[in, intptr])
ioctl$FS_IOC_GETVERSION(fd fd, cmd const[FS_IOC_GETVERSION], arg ptr[out, intptr])
ioctl$FS_IOC_SETVERSION(fd fd, cmd const[FS_IOC_SETVERSION], arg ptr[in, intptr])
ioctl$FS_IOC_FIEMAP(fd fd, cmd const[FS_IOC_FIEMAP], v ptr[in, fiemap])
ioctl$FS_IOC_RESVSP(fd fd, cmd const[FS_IOC_RESVSP], arg ptr[in, space_resv])
ioctl$FS_IOC_FSGETXATTR(fd fd, cmd const[FS_IOC_FSGETXATTR], arg ptr[in, fsxattr])
ioctl$FS_IOC_FSSETXATTR(fd fd, cmd const[FS_IOC_FSSETXATTR], arg ptr[in, fsxattr])
ioctl$FS_IOC_GETFSLABEL(fd fd, cmd const[FS_IOC_GETFSLABEL], arg ptr[out, array[const[0, int8], FSLABEL_MAX]])
ioctl$FS_IOC_SETFSLABEL(fd fd, cmd const[FS_IOC_SETFSLABEL], arg ptr[in, array[int8, FSLABEL_MAX]])
ioctl$FS_IOC_GETFSMAP(fd fd, cmd const[FS_IOC_GETFSMAP], arg ptr[in, fsmap_head])

space_resv {
	l_type		const[0, int16]
	l_whence	flags[seek_whence, int16]
	l_start		int64
	l_len		int64
	l_sysid		const[0, int32]
	l_pid		const[0, int32]
	l_pad		array[const[0, int32], 4]
}

fstrim_range {
	start	int64
	len	int64
	minlen	int64
}

file_clone_range {
	src_fd		fd
	pad		const[0, int32]
	src_offset	int64
	src_length	int64
	dest_offset	int64
}

file_dedupe_range {
	src_offset	int64
	src_length	int64
	dest_count	len[info, int16]
	reserved1	const[0, int16]
	reserved2	const[0, int32]
	info		array[file_dedupe_range_info]
}

file_dedupe_range_info {
	dest_fd		fd
	pad		const[0, int32]
	dest_offset	int64
	bytes_deduped	const[0, int64]
	status		const[0, int32]
	reserved	const[0, int32]
}

fsxattr {
	fsx_xflags	int32
	fsx_extsize	int32
	fsx_nextents	int32
	fsx_projid	int32
	fsx_cowextsize	int32
	fsx_pad		const[0, int64]
}

fiemap {
	start	int64
	len	int64
	flags	flags[fiemap_flags, int32]
	mapped	int32
	count	len[extent, int32]
	extent	array[fiemap_extent]
}

fiemap_extent {
	logical	int64
	phys	int64
	len	int64
	pad1	const[0, int64]
	pad2	const[0, int64]
	flags	flags[fiemap_extent_flags, int32]
	pad3	const[0, int32]
	pad4	const[0, int32]
	pad5	const[0, int32]
}

fsmap_head {
	fmh_iflags	const[0, int32]
	fmh_oflags	const[0, int32]
	fmh_count	len[fmh_recs, int32]
	fmh_entries	const[0, int32]
	fmh_reserved	array[const[0, int64], 6]
	fmh_keys	array[fsmap, 2]
	fmh_recs	array[array[const[0, int8], FSMAP_SIZE]]
}

fsmap {
	fmr_device	int32
	fmr_flags	int32
	fmr_physical	int64
	fmr_owner	int64
	fmr_offset	int64
	fmr_length	int64
	fmr_reserved	array[const[0, int64], 3]
}

define FSMAP_SIZE	sizeof(struct fsmap)