aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorJiaming Zhang <r772577952@gmail.com>2026-03-03 22:17:00 +0800
committerThoth <pimyn@google.com>2026-03-10 10:49:42 +0000
commit74d3734aaef747de9fac18609f36e767d950d7f0 (patch)
treeab73f8514510a53480c33a18646eba70860057b6 /sys/linux
parent3adee96a9567cc5a15ce8c6f8521d1372ffcf232 (diff)
sys/linux: add descriptions for OCFS2 subsystem
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/fs_ioctl_ocfs2.txt162
-rw-r--r--sys/linux/fs_ioctl_ocfs2.txt.const40
2 files changed, 202 insertions, 0 deletions
diff --git a/sys/linux/fs_ioctl_ocfs2.txt b/sys/linux/fs_ioctl_ocfs2.txt
new file mode 100644
index 000000000..f444f4374
--- /dev/null
+++ b/sys/linux/fs_ioctl_ocfs2.txt
@@ -0,0 +1,162 @@
+# Copyright 2026 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 <linux/fs.h>
+include <fs/ocfs2/ocfs2_fs.h>
+include <fs/ocfs2/ocfs2_ioctl.h>
+
+define OIU_UUID_STR_LEN OCFS2_TEXT_UUID_LEN + 1
+
+ioctl$OCFS2_IOC_RESVSP(fd fd, cmd const[OCFS2_IOC_RESVSP], arg ptr[in, ocfs2_space_resv])
+ioctl$OCFS2_IOC_RESVSP64(fd fd, cmd const[OCFS2_IOC_RESVSP64], arg ptr[in, ocfs2_space_resv])
+ioctl$OCFS2_IOC_UNRESVSP(fd fd, cmd const[OCFS2_IOC_UNRESVSP], arg ptr[in, ocfs2_space_resv])
+ioctl$OCFS2_IOC_UNRESVSP64(fd fd, cmd const[OCFS2_IOC_UNRESVSP64], arg ptr[in, ocfs2_space_resv])
+ioctl$OCFS2_IOC_GROUP_EXTEND(fd fd, cmd const[OCFS2_IOC_GROUP_EXTEND], arg ptr[in, int32])
+ioctl$OCFS2_IOC_GROUP_ADD(fd fd, cmd const[OCFS2_IOC_GROUP_ADD], arg ptr[in, ocfs2_new_group_input])
+ioctl$OCFS2_IOC_GROUP_ADD64(fd fd, cmd const[OCFS2_IOC_GROUP_ADD64], arg ptr[in, ocfs2_new_group_input])
+ioctl$OCFS2_IOC_REFLINK(fd fd, cmd const[OCFS2_IOC_REFLINK], arg ptr[in, reflink_arguments])
+ioctl$OCFS2_IOC_INFO(fd fd, cmd const[OCFS2_IOC_INFO], arg ptr[in, ocfs2_info])
+ioctl$OCFS2_IOC_MOVE_EXT(fd fd, cmd const[OCFS2_IOC_MOVE_EXT], arg ptr[inout, ocfs2_move_extents])
+
+ocfs2_l_type = F_RDLCK, F_WRLCK, F_UNLCK
+ocfs2_l_whence = SEEK_SET, SEEK_CUR, SEEK_END
+ocfs2_move_ext_flags = OCFS2_MOVE_EXT_FL_AUTO_DEFRAG, OCFS2_MOVE_EXT_FL_PART_DEFRAG, OCFS2_MOVE_EXT_FL_COMPLETE
+ocfs2_info_flags = OCFS2_INFO_FL_ERROR, OCFS2_INFO_FL_FILLED, OCFS2_INFO_FL_NON_COHERENT
+
+ocfs2_space_resv {
+ l_type flags[ocfs2_l_type, int16]
+ l_whence flags[ocfs2_l_whence, int16]
+ l_start int64
+ l_len int64
+ l_sysid int32
+ l_pid int32
+ l_pad array[const[0, int32], 4]
+}
+
+ocfs2_new_group_input {
+ group int64
+ clusters int32
+ frees int32
+ chain int16
+ reserved1 const[0, int16]
+ reserved2 const[0, int32]
+}
+
+reflink_arguments {
+ old_path ptr64[in, string]
+ new_path ptr64[in, string]
+ preserve int64
+}
+
+ocfs2_info {
+ oi_requests ptr64[in, array[ptr64[inout, ocfs2_info_request_union], OCFS2_INFO_MAX_REQUEST]]
+ oi_count len[oi_requests, int32]
+ oi_pad const[0, int32]
+}
+
+ocfs2_info_request_union [
+ clustersize ocfs2_info_clustersize
+ blocksize ocfs2_info_blocksize
+ maxslots ocfs2_info_maxslots
+ label ocfs2_info_label
+ uuid ocfs2_info_uuid
+ features ocfs2_info_fs_features
+ journal ocfs2_info_journal_size
+ freeinode ocfs2_info_freeinode
+ freefrag ocfs2_info_freefrag
+] [varlen]
+
+ocfs2_info_clustersize {
+ ic_req ocfs2_info_request_typed[OCFS2_INFO_CLUSTERSIZE]
+ ic_clustersize int32 (out)
+ ic_pad const[0, int32]
+}
+
+ocfs2_info_blocksize {
+ ib_req ocfs2_info_request_typed[OCFS2_INFO_BLOCKSIZE]
+ ib_blocksize int32 (out)
+ ib_pad const[0, int32]
+}
+
+ocfs2_info_maxslots {
+ im_req ocfs2_info_request_typed[OCFS2_INFO_MAXSLOTS]
+ im_max_slots int32 (out)
+ im_pad const[0, int32]
+}
+
+ocfs2_info_label {
+ il_req ocfs2_info_request_typed[OCFS2_INFO_LABEL]
+ il_label array[int8, OCFS2_MAX_VOL_LABEL_LEN] (out)
+} [packed]
+
+ocfs2_info_uuid {
+ iu_req ocfs2_info_request_typed[OCFS2_INFO_UUID]
+ iu_uuid_str array[int8, OIU_UUID_STR_LEN] (out)
+} [packed]
+
+ocfs2_info_fs_features {
+ if_req ocfs2_info_request_typed[OCFS2_INFO_FS_FEATURES]
+ if_compat_features int32 (out)
+ if_incompat_features int32 (out)
+ if_ro_compat_features int32 (out)
+ if_pad const[0, int32]
+}
+
+ocfs2_info_journal_size {
+ ij_req ocfs2_info_request_typed[OCFS2_INFO_JOURNAL_SIZE]
+ ij_journal_size int64 (out)
+}
+
+ocfs2_info_freeinode {
+ ifi_req ocfs2_info_request_typed[OCFS2_INFO_FREEINODE]
+ ifi_stat array[ocfs2_info_local_freeinode, OCFS2_MAX_SLOTS]
+ ifi_slotnum int32 (out)
+ ifi_pad const[0, int32]
+}
+
+ocfs2_info_local_freeinode {
+ lfi_total int64
+ lfi_free int64
+}
+
+ocfs2_info_freefrag {
+ iff_req ocfs2_info_request_typed[OCFS2_INFO_FREEFRAG]
+ iff_ffs ocfs2_info_freefrag_stats (out)
+ iff_chunksize int32
+ iff_pad const[0, int32]
+}
+
+ocfs2_info_freefrag_stats {
+ ffs_fc_hist ocfs2_info_free_chunk_list
+ ffs_clusters int32
+ ffs_free_clusters int32
+ ffs_free_chunks int32
+ ffs_free_chunks_real int32
+ ffs_min int32
+ ffs_max int32
+ ffs_avg int32
+ ffs_pad const[0, int32]
+}
+
+ocfs2_info_free_chunk_list {
+ fc_chunks array[int32, OCFS2_INFO_MAX_HIST]
+ fc_clusters array[int32, OCFS2_INFO_MAX_HIST]
+}
+
+type ocfs2_info_request_typed[CODE] {
+ ir_magic const[OCFS2_INFO_MAGIC, int32]
+ ir_code const[CODE, int32]
+ ir_size len[parent, int32]
+ ir_flags flags[ocfs2_info_flags, int32]
+}
+
+ocfs2_move_extents {
+ me_start int64 (in)
+ me_len int64 (in)
+ me_goal int64 (in)
+ me_threshold int64 (in)
+ me_flags flags[ocfs2_move_ext_flags, int64] (in)
+ me_moved_len int64 (out)
+ me_new_offset int64 (out)
+ me_reserved array[const[0, int32], 2]
+}
diff --git a/sys/linux/fs_ioctl_ocfs2.txt.const b/sys/linux/fs_ioctl_ocfs2.txt.const
new file mode 100644
index 000000000..f8527ea94
--- /dev/null
+++ b/sys/linux/fs_ioctl_ocfs2.txt.const
@@ -0,0 +1,40 @@
+# Code generated by syz-sysgen. DO NOT EDIT.
+arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
+F_RDLCK = 0
+F_UNLCK = 2
+F_WRLCK = 1
+OCFS2_INFO_BLOCKSIZE = 2
+OCFS2_INFO_CLUSTERSIZE = 1
+OCFS2_INFO_FL_ERROR = 2147483648
+OCFS2_INFO_FL_FILLED = 1073741824
+OCFS2_INFO_FL_NON_COHERENT = 1
+OCFS2_INFO_FREEFRAG = 9
+OCFS2_INFO_FREEINODE = 8
+OCFS2_INFO_FS_FEATURES = 6
+OCFS2_INFO_JOURNAL_SIZE = 7
+OCFS2_INFO_LABEL = 4
+OCFS2_INFO_MAGIC = 1328695630
+OCFS2_INFO_MAXSLOTS = 3
+OCFS2_INFO_MAX_HIST = 32
+OCFS2_INFO_MAX_REQUEST = 50
+OCFS2_INFO_UUID = 5
+OCFS2_IOC_GROUP_ADD = 1075343106, mips64le:ppc64le:2149084930
+OCFS2_IOC_GROUP_ADD64 = 1075343107, mips64le:ppc64le:2149084931
+OCFS2_IOC_GROUP_EXTEND = 1074032385, mips64le:ppc64le:2147774209
+OCFS2_IOC_INFO = 2148560645, mips64le:ppc64le:1074818821
+OCFS2_IOC_MOVE_EXT = 1077964550, mips64le:ppc64le:2151706374
+OCFS2_IOC_REFLINK = 1075343108, mips64le:ppc64le:2149084932
+OCFS2_IOC_RESVSP = 1076910120, 386:1076647976, mips64le:ppc64le:2150651944
+OCFS2_IOC_RESVSP64 = 1076910122, 386:1076647978, mips64le:ppc64le:2150651946
+OCFS2_IOC_UNRESVSP = 1076910121, 386:1076647977, mips64le:ppc64le:2150651945
+OCFS2_IOC_UNRESVSP64 = 1076910123, 386:1076647979, mips64le:ppc64le:2150651947
+OCFS2_MAX_SLOTS = 255
+OCFS2_MAX_VOL_LABEL_LEN = 64
+OCFS2_MOVE_EXT_FL_AUTO_DEFRAG = 1
+OCFS2_MOVE_EXT_FL_COMPLETE = 4
+OCFS2_MOVE_EXT_FL_PART_DEFRAG = 2
+OIU_UUID_STR_LEN = 33
+SEEK_CUR = 1
+SEEK_END = 2
+SEEK_SET = 0
+__NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015