github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/sys/linux/fs_ioctl_f2fs.txt (about)

     1  # Copyright 2020 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/fs.h>
     5  include <linux/f2fs_fs.h>
     6  include <fs/f2fs/f2fs.h>
     7  include <uapi/linux/f2fs.h>
     8  
     9  ioctl$F2FS_IOC_START_ATOMIC_WRITE(fd fd, cmd const[F2FS_IOC_START_ATOMIC_WRITE], arg const[0])
    10  ioctl$F2FS_IOC_COMMIT_ATOMIC_WRITE(fd fd, cmd const[F2FS_IOC_COMMIT_ATOMIC_WRITE], arg const[0])
    11  ioctl$F2FS_IOC_START_VOLATILE_WRITE(fd fd, cmd const[F2FS_IOC_START_VOLATILE_WRITE], arg const[0])
    12  ioctl$F2FS_IOC_RELEASE_VOLATILE_WRITE(fd fd, cmd const[F2FS_IOC_RELEASE_VOLATILE_WRITE], arg const[0])
    13  ioctl$F2FS_IOC_ABORT_ATOMIC_WRITE(fd fd, cmd const[F2FS_IOC_ABORT_ATOMIC_WRITE], arg const[0])
    14  ioctl$F2FS_IOC_GARBAGE_COLLECT(fd fd, cmd const[F2FS_IOC_GARBAGE_COLLECT], arg ptr[in, bool32])
    15  ioctl$F2FS_IOC_GARBAGE_COLLECT_RANGE(fd fd, cmd const[F2FS_IOC_GARBAGE_COLLECT_RANGE], arg ptr[in, f2fs_gc_range])
    16  ioctl$F2FS_IOC_WRITE_CHECKPOINT(fd fd, cmd const[F2FS_IOC_WRITE_CHECKPOINT], arg const[0])
    17  ioctl$F2FS_IOC_DEFRAGMENT(fd fd, cmd const[F2FS_IOC_DEFRAGMENT], arg ptr[inout, f2fs_defragment])
    18  ioctl$F2FS_IOC_MOVE_RANGE(fd fd, cmd const[F2FS_IOC_MOVE_RANGE], arg ptr[inout, f2fs_move_range])
    19  ioctl$F2FS_IOC_FLUSH_DEVICE(fd fd, cmd const[F2FS_IOC_FLUSH_DEVICE], arg ptr[in, f2fs_flush_device])
    20  ioctl$F2FS_IOC_GET_FEATURES(fd fd, cmd const[F2FS_IOC_GET_FEATURES], arg ptr[out, int32])
    21  ioctl$F2FS_IOC_GET_PIN_FILE(fd fd, cmd const[F2FS_IOC_GET_PIN_FILE], arg ptr[out, bool32])
    22  ioctl$F2FS_IOC_SET_PIN_FILE(fd fd, cmd const[F2FS_IOC_SET_PIN_FILE], arg ptr[in, bool32])
    23  ioctl$F2FS_IOC_PRECACHE_EXTENTS(fd fd, cmd const[F2FS_IOC_PRECACHE_EXTENTS], arg const[0])
    24  ioctl$F2FS_IOC_RESIZE_FS(fd fd, cmd const[F2FS_IOC_RESIZE_FS], arg ptr[in, int64])
    25  ioctl$F2FS_IOC_GET_COMPRESS_BLOCKS(fd fd, cmd const[F2FS_IOC_GET_COMPRESS_BLOCKS], arg ptr[out, int64])
    26  ioctl$F2FS_IOC_RELEASE_COMPRESS_BLOCKS(fd fd, cmd const[F2FS_IOC_RELEASE_COMPRESS_BLOCKS], arg ptr[out, int64])
    27  ioctl$F2FS_IOC_RESERVE_COMPRESS_BLOCKS(fd fd, cmd const[F2FS_IOC_RESERVE_COMPRESS_BLOCKS], arg ptr[out, int64])
    28  ioctl$F2FS_IOC_SEC_TRIM_FILE(fd fd, cmd const[F2FS_IOC_SEC_TRIM_FILE], arg ptr[in, f2fs_sectrim_range])
    29  ioctl$F2FS_IOC_GET_COMPRESS_OPTION(fd fd, cmd const[F2FS_IOC_GET_COMPRESS_OPTION], arg ptr[out, f2fs_comp_option])
    30  ioctl$F2FS_IOC_SET_COMPRESS_OPTION(fd fd, cmd const[F2FS_IOC_SET_COMPRESS_OPTION], arg ptr[in, f2fs_comp_option])
    31  ioctl$F2FS_IOC_DECOMPRESS_FILE(fd fd, cmd const[F2FS_IOC_DECOMPRESS_FILE], arg const[0])
    32  ioctl$F2FS_IOC_COMPRESS_FILE(fd fd, cmd const[F2FS_IOC_COMPRESS_FILE], arg const[0])
    33  
    34  # F2FS_IOC_SHUTDOWN on root fs effectively brings the machine down in weird ways.
    35  # Fortunately, the value does not conflict with any other ioctl commands for now.
    36  ioctl$F2FS_IOC_SHUTDOWN(fd fd, cmd const[F2FS_IOC_SHUTDOWN], args ptr[in, flags[f2fs_shutdown_flag, int32]]) (disabled)
    37  
    38  f2fs_gc_range {
    39  	sync	bool32
    40  	start	int64
    41  	len	int64
    42  }
    43  
    44  f2fs_defragment {
    45  	start	int64
    46  	len	int64
    47  }
    48  
    49  f2fs_move_range {
    50  	dst_fd	fd
    51  	pos_in	int64
    52  	pos_out	int64
    53  	len	int64
    54  }
    55  
    56  f2fs_flush_device {
    57  	dev_num		int32
    58  	segments	int32
    59  }
    60  
    61  f2fs_shutdown_flag = F2FS_GOING_DOWN_FULLSYNC, F2FS_GOING_DOWN_METASYNC, F2FS_GOING_DOWN_NOSYNC, F2FS_GOING_DOWN_METAFLUSH, F2FS_GOING_DOWN_NEED_FSCK
    62  
    63  f2fs_sectrim_range {
    64  	start	int64
    65  	len	int64
    66  	flags	flags[f2fs_sectrim_range_flag, int64]
    67  }
    68  
    69  f2fs_sectrim_range_flag = F2FS_TRIM_FILE_DISCARD, F2FS_TRIM_FILE_ZEROOUT, F2FS_TRIM_FILE_MASK
    70  
    71  f2fs_comp_option {
    72  	algorithm		int8
    73  	log_cluster_size	int8
    74  }