f2fs_io(8)
πΈ NAME πΈ
f2fs_io β f2fs ioctl utility. Also hi bestie, this page is f2fs_io(8) from the System Administration Utilities corner of the manual π«Ά.
β¨ DESCRIPTION β¨
f2fs_io is used to send various commands to the f2fs file system for administrative purposes. Itβs giving admin-utility main character energy, no cap π
.
π« AVAILABLE COMMANDS π«
OK bestie, hereβs the full command menu β every single one, periodt π.
set_verity [file]β Set the verity flags associated with the specified file.fsync [file]β Runfsyncon the given file.fdatasync [file]β Runfdatasyncon the given file.getflags [file]β Get the flags associated with the specified file.setflags [flag] [file]β Set an f2fs file on specified file. Theflagcan becasefold,compression,nocompression,immutable, andnocow.clearflags [flag] [file]β Clear the specified flag on the target file, which can becompression,nocompression,immutable, andnocow.shutdown shutdown filesystemβ Freeze and stop all IOs for the file system mounted ondir. Thelevelparameter can be:0β going down with full sync1β going down with checkpoint only2β going down with no sync3β going down with metadata flush4β 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. Theadvicecan bewillneed,dontneed,noreuse,sequential,random.fallocate [-c] [-i] [-p] [-z] [keep_size] [offset] [length] [file]β Request that space be allocated on a file. Thekeep_sizeparameter can be either1or0. Thepatternparameter 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 tofile_path. Thepatternparameter can be:zeroβ zerosinc_numβ incrementing numbersrandβ random numbers
The IO parameter can be:
bufferedβ buffered I/Odioβ direct I/Odsyncβ direct I/O withO_DSYNC
read [chunk_size in 4kb] [offset in chunk_size] [count] [IO] [print_nbytes] [file_path]β Read data infile_pathand printprint_nbytes. The IO options can be:bufferedβ buffered I/Odontcacheβ buffered I/O withRWF_DONTCACHEdioβ direct I/Ommapβmmap(MAP_POPULATE)mlockβmmap()+mlock()
fiemap [offset in 4kb] [count] [file_path] {flags}β Get block address in file.gc_urgent dev [start|end|run] [time in sec]β Start, end, or rungc_urgentfor a given time period.defrag_file [start] [length] [file_path]β Defragment a file.copy [-d] [-m] [-s] [src_path] [dst_path]β Copy file fromsrc_pathtodst_path. Thepatternparameter 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]β Geti_advisevalue and info in file.ioprio [hint] [file]β Setioprioto the file. Theiopriocan beioprio_write.test_create_perf [-s] [-S] [dir] [num_files] [size_kb]β Measure file creation and deletion performance.-sβ Callfsync()after each file creation.-Sβ Callsync()after deleting all files.
test_lookup_perf [-i] [-v] [dir] [num_files]β Measure readdir/stat performance.-iβ Initialized to create files only.-vβ Verbose mode.
freeze [directory]β Freeze filesystem that directory belongs to.thaw [directory]β Thaw filesystem that directory belongs to.
π AUTHOR π
This version of f2fs_io has been written by Jaegeuk Kim <jaegeuk@kernel.org>. Big icon energy, fr fr π.
π AVAILABILITY π
f2fs_io is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.
Thatβs the whole manual page, bestie π β f2fs_io(8) from f2fs-tools, dated March 2020. Go forth and slay those ioctls β¨π.
π¦ where this page comes from
- arch rolling: f2fs-tools 1.17.0-1 Β· GPL-2.0-only AND (GPL-2.0-only OR LGPL-2.1-only)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms