github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/sys/linux/fs_ioctl.txt (about) 1 # Copyright 2018 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/fiemap.h> 5 include <uapi/linux/fs.h> 6 include <uapi/linux/fsmap.h> 7 include <linux/falloc.h> 8 9 ioctl$FIBMAP(fd fd, cmd const[FIBMAP], arg ptr[in, int32]) 10 ioctl$FIGETBSZ(fd fd, cmd const[FIGETBSZ], arg ptr[out, intptr]) 11 ioctl$FITRIM(fd fd, cmd const[FITRIM], arg ptr[in, fstrim_range]) 12 ioctl$FICLONE(fd fd, cmd const[FICLONE], arg fd) 13 ioctl$FICLONERANGE(fd fd, cmd const[FICLONERANGE], arg ptr[in, file_clone_range]) 14 ioctl$FIDEDUPERANGE(fd fd, cmd const[FIDEDUPERANGE], arg ptr[in, file_dedupe_range]) 15 16 ioctl$FS_IOC_GETFLAGS(fd fd, cmd const[FS_IOC_GETFLAGS], arg ptr[out, flags[fs_flags, int32]]) 17 ioctl$FS_IOC_SETFLAGS(fd fd, cmd const[FS_IOC_SETFLAGS], arg ptr[in, flags[fs_flags, int32]]) 18 19 ioctl$FS_IOC_GETVERSION(fd fd, cmd const[FS_IOC_GETVERSION], arg ptr[out, intptr]) 20 ioctl$FS_IOC_SETVERSION(fd fd, cmd const[FS_IOC_SETVERSION], arg ptr[in, intptr]) 21 ioctl$FS_IOC_FIEMAP(fd fd, cmd const[FS_IOC_FIEMAP], v ptr[in, fiemap]) 22 ioctl$FS_IOC_RESVSP(fd fd, cmd const[FS_IOC_RESVSP], arg ptr[in, space_resv]) 23 ioctl$FS_IOC_FSGETXATTR(fd fd, cmd const[FS_IOC_FSGETXATTR], arg ptr[in, fsxattr]) 24 ioctl$FS_IOC_FSSETXATTR(fd fd, cmd const[FS_IOC_FSSETXATTR], arg ptr[in, fsxattr]) 25 ioctl$FS_IOC_GETFSLABEL(fd fd, cmd const[FS_IOC_GETFSLABEL], arg ptr[out, array[const[0, int8], FSLABEL_MAX]]) 26 ioctl$FS_IOC_SETFSLABEL(fd fd, cmd const[FS_IOC_SETFSLABEL], arg ptr[in, array[int8, FSLABEL_MAX]]) 27 ioctl$FS_IOC_GETFSMAP(fd fd, cmd const[FS_IOC_GETFSMAP], arg ptr[in, fsmap_head]) 28 ioctl$FS_IOC_GETFSUUID(fd fd, cmd const[FS_IOC_GETFSUUID], arg ptr[out, fsuuid2]) 29 ioctl$FS_IOC_GETFSSYSFSPATH(fd fd, cmd const[FS_IOC_GETFSSYSFSPATH], arg ptr[out, fs_sysfs_path]) 30 31 space_resv { 32 l_type const[0, int16] 33 l_whence flags[seek_whence, int16] 34 l_start int64 35 l_len int64 36 l_sysid const[0, int32] 37 l_pid const[0, int32] 38 l_pad array[const[0, int32], 4] 39 } 40 41 fstrim_range { 42 start int64 43 len int64 44 minlen int64 45 } 46 47 file_clone_range { 48 src_fd align64[fd] 49 src_offset int64 50 src_length int64 51 dest_offset int64 52 } 53 54 file_dedupe_range { 55 src_offset int64 56 src_length int64 57 dest_count len[info, int16] 58 reserved1 const[0, int16] 59 reserved2 const[0, int32] 60 info array[file_dedupe_range_info] 61 } 62 63 file_dedupe_range_info { 64 dest_fd align64[fd] 65 dest_offset int64 66 bytes_deduped const[0, int64] 67 status const[0, int32] 68 reserved const[0, int32] 69 } 70 71 fsxattr { 72 fsx_xflags int32 73 fsx_extsize int32 74 fsx_nextents int32 75 fsx_projid int32 76 fsx_cowextsize int32 77 fsx_pad array[const[0, int8], 8] 78 } 79 80 fiemap { 81 start int64 82 len int64 83 flags flags[fiemap_flags, int32] 84 mapped int32 85 count len[extent, int32] 86 reserved const[0, int32] 87 extent array[fiemap_extent] 88 } 89 90 fiemap_extent { 91 fe_logical int64 92 fe_physical int64 93 fe_length int64 94 fe_reserved64 array[const[0, int64], 2] 95 fe_flags flags[fiemap_extent_flags, int32] 96 fe_reserved array[const[0, int32], 3] 97 } 98 99 fsmap_head { 100 fmh_iflags const[0, int32] 101 fmh_oflags const[0, int32] 102 fmh_count len[fmh_recs, int32] 103 fmh_entries const[0, int32] 104 fmh_reserved array[const[0, int64], 6] 105 fmh_keys array[fsmap, 2] 106 fmh_recs array[array[const[0, int8], FSMAP_SIZE]] 107 } 108 109 fsmap { 110 fmr_device int32 111 fmr_flags int32 112 fmr_physical int64 113 fmr_owner int64 114 fmr_offset int64 115 fmr_length int64 116 fmr_reserved array[const[0, int64], 3] 117 } 118 119 fs_flags = FS_SECRM_FL, FS_UNRM_FL, FS_COMPR_FL, FS_SYNC_FL, FS_IMMUTABLE_FL, FS_APPEND_FL, FS_NODUMP_FL, FS_NOATIME_FL, FS_DIRTY_FL, FS_COMPRBLK_FL, FS_NOCOMP_FL, FS_ENCRYPT_FL, FS_BTREE_FL, FS_INDEX_FL, FS_IMAGIC_FL, FS_JOURNAL_DATA_FL, FS_NOTAIL_FL, FS_DIRSYNC_FL, FS_TOPDIR_FL, FS_HUGE_FILE_FL, FS_EXTENT_FL, FS_VERITY_FL, FS_EA_INODE_FL, FS_EOFBLOCKS_FL, FS_NOCOW_FL, FS_DAX_FL, FS_INLINE_DATA_FL, FS_PROJINHERIT_FL, FS_CASEFOLD_FL, FS_RESERVED_FL 120 121 define FSMAP_SIZE sizeof(struct fsmap) 122 123 fsuuid2 { 124 len const[16, int8] 125 uuid array[int8, 16] 126 } 127 128 fs_sysfs_path { 129 len len[name, int8] 130 name array[int8, 128] 131 }