Skip to content

Commit 4683d57

Browse files
Radon10043pimyn-girgis
authored andcommitted
sys/linux: add descriptions for NILFS2 subsystem
1 parent ed8b2d4 commit 4683d57

2 files changed

Lines changed: 168 additions & 0 deletions

File tree

sys/linux/fs_ioctl_nilfs2.txt

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Copyright 2026 syzkaller project authors. All rights reserved.
2+
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
3+
4+
include <uapi/linux/nilfs2_ondisk.h>
5+
include <uapi/linux/nilfs2_api.h>
6+
7+
define NILFS_VDESC_SIZE sizeof(struct nilfs_vdesc)
8+
define NILFS_PERIOD_SIZE sizeof(struct nilfs_period)
9+
define NILFS_BDESC_SIZE sizeof(struct nilfs_bdesc)
10+
define NILFS_CPINFO_SIZE sizeof(struct nilfs_cpinfo)
11+
define NILFS_SUINFO_SIZE sizeof(struct nilfs_suinfo)
12+
define NILFS_SUINFO_UPDATE_SIZE sizeof(struct nilfs_suinfo_update)
13+
define NILFS_VINFO_SIZE sizeof(struct nilfs_vinfo)
14+
15+
ioctl$NILFS_IOCTL_CHANGE_CPMODE(fd fd, cmd const[NILFS_IOCTL_CHANGE_CPMODE], arg ptr[in, nilfs_cpmode])
16+
ioctl$NILFS_IOCTL_DELETE_CHECKPOINT(fd fd, cmd const[NILFS_IOCTL_DELETE_CHECKPOINT], arg ptr[in, int64])
17+
ioctl$NILFS_IOCTL_GET_CPINFO(fd fd, cmd const[NILFS_IOCTL_GET_CPINFO], arg ptr[inout, nilfs_argv_cpinfo])
18+
ioctl$NILFS_IOCTL_GET_CPSTAT(fd fd, cmd const[NILFS_IOCTL_GET_CPSTAT], arg ptr[out, nilfs_cpstat])
19+
ioctl$NILFS_IOCTL_GET_SUINFO(fd fd, cmd const[NILFS_IOCTL_GET_SUINFO], arg ptr[inout, nilfs_argv_typed[nilfs_suinfo, inout, NILFS_SUINFO_SIZE]])
20+
ioctl$NILFS_IOCTL_SET_SUINFO(fd fd, cmd const[NILFS_IOCTL_SET_SUINFO], arg ptr[in, nilfs_argv_typed[nilfs_suinfo_update, in, NILFS_SUINFO_UPDATE_SIZE]])
21+
ioctl$NILFS_IOCTL_GET_SUSTAT(fd fd, cmd const[NILFS_IOCTL_GET_SUSTAT], arg ptr[out, nilfs_sustat])
22+
ioctl$NILFS_IOCTL_GET_VINFO(fd fd, cmd const[NILFS_IOCTL_GET_VINFO], arg ptr[inout, nilfs_argv_typed[nilfs_vinfo, inout, NILFS_VINFO_SIZE]])
23+
ioctl$NILFS_IOCTL_GET_BDESCS(fd fd, cmd const[NILFS_IOCTL_GET_BDESCS], arg ptr[inout, nilfs_argv_typed[nilfs_bdesc, inout, NILFS_BDESC_SIZE]])
24+
ioctl$NILFS_IOCTL_CLEAN_SEGMENTS(fd fd, cmd const[NILFS_IOCTL_CLEAN_SEGMENTS], arg ptr[in, nilfs_ioctl_clean_segments_args])
25+
ioctl$NILFS_IOCTL_SYNC(fd fd, cmd const[NILFS_IOCTL_SYNC], arg ptr[out, int64, opt])
26+
ioctl$NILFS_IOCTL_RESIZE(fd fd, cmd const[NILFS_IOCTL_RESIZE], arg ptr[in, int64])
27+
ioctl$NILFS_IOCTL_SET_ALLOC_RANGE(fd fd, cmd const[NILFS_IOCTL_SET_ALLOC_RANGE], arg ptr[in, array[int64, 2]])
28+
29+
nilfs_checkpoint_mode = NILFS_CHECKPOINT, NILFS_SNAPSHOT
30+
nilfs_suinfo_flags = NILFS_SUINFO_ACTIVE, NILFS_SUINFO_DIRTY, NILFS_SUINFO_ERROR
31+
nilfs_suinfo_update_flags = NILFS_SUINFO_UPDATE_LASTMOD, NILFS_SUINFO_UPDATE_NBLOCKS, NILFS_SUINFO_UPDATE_FLAGS
32+
nilfs_cpinfo_flags = NILFS_CPINFO_SNAPSHOT, NILFS_CPINFO_INVALID, NILFS_CPINFO_SKETCH, NILFS_CPINFO_MINOR
33+
34+
nilfs_cpmode {
35+
cm_cno int64
36+
cm_mode flags[nilfs_checkpoint_mode, int32]
37+
cm_pad const[0, int32]
38+
}
39+
40+
nilfs_argv_cpinfo {
41+
v_base ptr[inout, array[nilfs_cpinfo]]
42+
v_nmembs len[v_base, int32]
43+
v_size const[NILFS_CPINFO_SIZE, int16]
44+
v_flags flags[nilfs_checkpoint_mode, int16]
45+
v_index int64
46+
}
47+
48+
nilfs_cpstat {
49+
cs_cno int64
50+
cs_ncps int64
51+
cs_nsss int64
52+
}
53+
54+
nilfs_suinfo {
55+
sui_lastmod int64
56+
sui_nblocks int32
57+
sui_flags flags[nilfs_suinfo_flags, int32]
58+
}
59+
60+
nilfs_suinfo_update {
61+
sup_segnum int64
62+
sup_flags flags[nilfs_suinfo_update_flags, int32]
63+
sup_reserved const[0, int32]
64+
sup_sui nilfs_suinfo
65+
}
66+
67+
nilfs_sustat {
68+
ss_nsegs int64
69+
ss_ncleansegs int64
70+
ss_ndirtysegs int64
71+
ss_ctime int64
72+
ss_nongc_ctime int64
73+
ss_prot_seq int64
74+
}
75+
76+
nilfs_vinfo {
77+
vi_vblocknr int64
78+
vi_start int64
79+
vi_end int64
80+
vi_blocknr int64
81+
}
82+
83+
nilfs_bdesc {
84+
bd_ino int64
85+
bd_oblocknr int64
86+
bd_blocknr int64
87+
bd_offset int64
88+
bd_level int32
89+
bd_pad const[0, int32]
90+
}
91+
92+
nilfs_ioctl_clean_segments_args {
93+
argv0 nilfs_argv_typed[nilfs_vdesc, in, NILFS_VDESC_SIZE]
94+
argv1 nilfs_argv_typed[nilfs_period, in, NILFS_PERIOD_SIZE]
95+
argv2 nilfs_argv_typed[int64, in, 8]
96+
argv3 nilfs_argv_typed[nilfs_bdesc, in, NILFS_BDESC_SIZE]
97+
argv4 nilfs_argv_typed[int64, in, 8]
98+
}
99+
100+
nilfs_vdesc {
101+
vd_ino int64
102+
vd_cno int64
103+
vd_vblocknr int64
104+
vd_period nilfs_period
105+
vd_blocknr int64
106+
vd_offset int64
107+
vd_flags int32
108+
vd_pad const[0, int32]
109+
}
110+
111+
nilfs_period {
112+
p_start int64
113+
p_end int64
114+
}
115+
116+
nilfs_cpinfo {
117+
ci_flags flags[nilfs_cpinfo_flags, int32]
118+
ci_pad const[0, int32]
119+
ci_cno int64
120+
ci_create int64
121+
ci_nblk_inc int64
122+
ci_inodes_count int64
123+
ci_blocks_count int64
124+
ci_next int64
125+
}
126+
127+
type nilfs_argv_typed[T, DIR, SIZE] {
128+
v_base ptr[DIR, array[T]]
129+
v_nmembs len[v_base, int32]
130+
v_size const[SIZE, int16]
131+
v_flags int16
132+
v_index int64
133+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Code generated by syz-sysgen. DO NOT EDIT.
2+
arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
3+
NILFS_BDESC_SIZE = 40
4+
NILFS_CHECKPOINT = 0
5+
NILFS_CPINFO_INVALID = 1
6+
NILFS_CPINFO_MINOR = 3
7+
NILFS_CPINFO_SIZE = 56
8+
NILFS_CPINFO_SKETCH = 2
9+
NILFS_CPINFO_SNAPSHOT = 0
10+
NILFS_IOCTL_CHANGE_CPMODE = 1074818688, mips64le:ppc64le:2148560512
11+
NILFS_IOCTL_CLEAN_SEGMENTS = 1081634440, mips64le:ppc64le:2155376264
12+
NILFS_IOCTL_DELETE_CHECKPOINT = 1074294401, mips64le:ppc64le:2148036225
13+
NILFS_IOCTL_GET_BDESCS = 3222826631
14+
NILFS_IOCTL_GET_CPINFO = 2149084802, mips64le:ppc64le:1075342978
15+
NILFS_IOCTL_GET_CPSTAT = 2149084803, mips64le:ppc64le:1075342979
16+
NILFS_IOCTL_GET_SUINFO = 2149084804, mips64le:ppc64le:1075342980
17+
NILFS_IOCTL_GET_SUSTAT = 2150657669, mips64le:ppc64le:1076915845
18+
NILFS_IOCTL_GET_VINFO = 3222826630
19+
NILFS_IOCTL_RESIZE = 1074294411, mips64le:ppc64le:2148036235
20+
NILFS_IOCTL_SET_ALLOC_RANGE = 1074818700, mips64le:ppc64le:2148560524
21+
NILFS_IOCTL_SET_SUINFO = 1075342989, mips64le:ppc64le:2149084813
22+
NILFS_IOCTL_SYNC = 2148036234, mips64le:ppc64le:1074294410
23+
NILFS_PERIOD_SIZE = 16
24+
NILFS_SNAPSHOT = 1
25+
NILFS_SUINFO_ACTIVE = 0
26+
NILFS_SUINFO_DIRTY = 1
27+
NILFS_SUINFO_ERROR = 2
28+
NILFS_SUINFO_SIZE = 16
29+
NILFS_SUINFO_UPDATE_FLAGS = 2
30+
NILFS_SUINFO_UPDATE_LASTMOD = 0
31+
NILFS_SUINFO_UPDATE_NBLOCKS = 1
32+
NILFS_SUINFO_UPDATE_SIZE = 32
33+
NILFS_VDESC_SIZE = 64
34+
NILFS_VINFO_SIZE = 32
35+
__NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015

0 commit comments

Comments
 (0)