f2fs_io(8)

NAME
f2fs_io - f2fs ioctl utility

DESCRIPTION
f2fs_io is used to send various commands to the f2fs file system for administrative purposes.

AVAILABLE COMMANDS

set_verity [file]
    Set the verity flags associated with the specified file.

fsync [file]
    fsync given the file.

fdatasync [file]
    fdatasync given the file.

getflags [file]
    Get the flags associated with the specified file.

setflags [flag] [file]
    Set an f2fs file on specified file. The flag can be casefold, compression, nocompression, immutable, and nocow.

clearflags [flag] [file]
    Clear the specified flag on the target file, which can be compression,
     nocompression, immutable, and nocow.

shutdown shutdown filesystem
    Freeze and stop all IOs for the file system mounted on dir. The level parameter can be:

    0   going down with full sync

    1   going down with checkpoint only

    2   going down with no sync

    3   going down with metadata flush

    4   going down with fsck mark

pinfile [get|set|unset] [file]
    Get or set the pinning status on a file.

fadvise [advice] [offset] [length] [file]
    Pass an advice to the specified file. The advice can be willneed, dontneed, noreuse, sequential, random.

fallocate [-c] [-i] [-p] [-z] [keep_size] [offset] [length] [file]
    Request that space be allocated on a file. The keep_size parameter can be either 1 or 0. The pattern parameter can be:

    -c  collapse range

    -i  insert range

    -p  punch hole

    -z  zero range

write [chunk_size in 4kb] [offset in chunk_size] [count] [pattern] [IO] [file_path]
    Write a given pattern to file_path. The pattern parameter can be:

    zero
        zeros

    inc_num
        incrementing numbers

    rand
        random numbers

    The IO parameter can be:

    buffered
        buffered I/O

    dio direct I/O

    dsync
        direct I/O with O_DSYNC

read [chunk_size in 4kb] [offset in chunk_size] [count] [IO] [print_nbytes] [file_path]
    Read data in file_path and print print_nbytes. The IO options can be:

    buffered
        buffered I/O

    dio direct I/O

fiemap [offset in 4kb] [count] [file_path]
    get block address in file

gc_urgent dev [start|end|run] [time in sec]
    Start, end, or run gc_urgent for a given time period

defrag_file [start] [length] [file_path]
    Defragment a file.

copy [-d] [-m] [-s] [src_path] [dst_path]
    Copy file from src_path to dst_path. The pattern parameter can be:

    -d  use direct I/O

    -m  use mmap for source file

    -s  use sendfile to transfer data

get_cblocks [file]
    Get the number of compressed blocks.

release_cblocks [file]
    Release compressed blocks to get free space.

reserve_cblocks [file]
    Reserve free blocks to prepare decompressing blocks in the file.

gc [sync_mode] [file]
    Trigger filesystem GC

checkpoint [file]
    Trigger filesystem checkpoint

precache_extents [file]
    Trigger precache extents

move_range [src_path] [dst_path] [src_start] [dst_start] [length]
    Move a range of data blocks from source file to destination file

gc_range [sync_mode] [start in 4kb] [length in 4kb] [file]
    Trigger gc to move data blocks from specified address range

get_advise [file]
    Get i_advise value and info in file

ioprio [hint] [file]
    Set ioprio to the file. The ioprio can be ioprio_write.

AUTHOR
This version of f2fs_io has been written by Jaegeuk Kim <jaegeuk@kernel.org>.

AVAILABILITY
f2fs_io is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.