mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-12-02 07:46:39 +00:00
1ba0a74ef2
Signed-off-by: Theodore Ts'o <tytso@mit.edu> [Jaegeuk Kim: add missing entries and fix Makefile.am] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
139 lines
2.7 KiB
Groff
139 lines
2.7 KiB
Groff
.\" Generated by help2man 1.47.12.
|
|
.TH f2fs_io "8" "March 2020" "f2fs-tools" "System Administration Utilities"
|
|
.SH NAME
|
|
f2fs_io \- f2fs ioctl utility
|
|
.SH DESCRIPTION
|
|
.B f2fs_io
|
|
is used to send various commands to the f2fs file system for
|
|
administrative purposes.
|
|
.SH "AVAILABLE COMMANDS"
|
|
.TP
|
|
\fBset_verity\fR \fI[file]\fR
|
|
Set the verity flags associated with the specified file.
|
|
.TP
|
|
\fBgetflags\fR \fI[file]\fR
|
|
Get the flags associated with the specified file.
|
|
.TP
|
|
\fBsetflags\fR \fI[flag] [file]\fR
|
|
Set an f2fs file on specified file. The flag can be casefold,
|
|
compression, and nocompression.
|
|
.TP
|
|
\fBshutdown\fR \fIshutdown filesystem\fR
|
|
Freeze and stop all IOs for the file system mounted on
|
|
.IR dir.
|
|
The level parameter can be:
|
|
.RS 1.2i
|
|
.TP
|
|
0
|
|
going down with full sync
|
|
.TP
|
|
1
|
|
going down with checkpoint only
|
|
.TP
|
|
2
|
|
going down with no sync
|
|
.TP
|
|
3
|
|
going down with metadata flush
|
|
.TP
|
|
4
|
|
going down with fsck mark
|
|
.RE
|
|
.TP
|
|
\fBpinfile\fR \fI[get|set] [file]\fR
|
|
Get or set the pinning status on a file.
|
|
.TP
|
|
\fBfallocate\fR \fI[keep_size] [offset] [length] [file]\fR
|
|
Request that space be allocated on a file. The
|
|
.I keep_size
|
|
parameter can be either 1 or 0.
|
|
.TP
|
|
\fBwrite\fR \fI[chunk_size in 4kb] [offset in chunk_size] [count] [pattern] [IO] [file_path]\fR
|
|
Write a given pattern to
|
|
.IR file_path .
|
|
The
|
|
.I pattern
|
|
parameter can be:
|
|
.RS 1.2in
|
|
.TP
|
|
.B zero
|
|
zeros
|
|
.TP
|
|
.B inc_num
|
|
incrementing numbers
|
|
.TP
|
|
.B rand
|
|
random numbers
|
|
.RE
|
|
.IP
|
|
The
|
|
.I IO
|
|
parameter can be:
|
|
.RS 1.2in
|
|
.TP
|
|
.B buffered
|
|
buffered I/O
|
|
.TP
|
|
.B dio
|
|
direct I/O
|
|
.RE
|
|
.TP
|
|
\fBread\fR \fI[chunk_size in 4kb] [offset in chunk_size] [count] [IO] [print_nbytes] [file_path]\fR
|
|
Read data in
|
|
.I file_path
|
|
and print
|
|
.IR print_nbytes .
|
|
The
|
|
.I IO
|
|
options can be:
|
|
.RS 1.2in
|
|
.TP
|
|
.B buffered
|
|
buffered I/O
|
|
.TP
|
|
.B dio
|
|
direct I/O
|
|
.RE
|
|
.TP
|
|
\fBfiemap\fR \fI[offset in 4kb] [count] [file_path]\fR
|
|
get block address in file
|
|
.TP
|
|
\fBgc_urgent\fR \fIdev [start|end|run] [time in sec]\fR
|
|
Start, end, or run gc_urgent for a given time period
|
|
.TP
|
|
\fBdefrag_file\fR \fI[start] [length] [file_path]\fR
|
|
Defragment a file.
|
|
.TP
|
|
\fBcopy\fR \fI[-d] [-m] [-s] [src_path] [dst_path]\fR
|
|
Copy file from src_path to dst_path.
|
|
The
|
|
.I pattern
|
|
parameter can be:
|
|
.RS 1.2in
|
|
.TP
|
|
.B -d
|
|
use direct I/O
|
|
.TP
|
|
.B -m
|
|
use mmap for source file
|
|
.TP
|
|
.B -s
|
|
use sendfile to transfer data
|
|
.RE
|
|
.TP
|
|
\fBget_cblocks\fR \fI[file]\fR
|
|
Get the number of compressed blocks.
|
|
.TP
|
|
\fBrelease_cblocks\fR \fI[file]\fR
|
|
Release compressed blocks to get free space.
|
|
.TP
|
|
\fBreserve_cblocks\fR \fI[file]\fR
|
|
Reserve free blocks to prepare decompressing blocks in the file.
|
|
.SH AUTHOR
|
|
This version of
|
|
.B f2fs_io
|
|
has been written by Jaegeuk Kim <jaegeuk@kernel.org>.
|
|
.SH AVAILABILITY
|
|
.B f2fs_io
|
|
is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.
|