f2fs_io: support move_range command
[platform/upstream/f2fs-tools.git] / man / f2fs_io.8
1 .\" Generated by help2man 1.47.12.
2 .TH f2fs_io "8" "March 2020" "f2fs-tools" "System Administration Utilities"
3 .SH NAME
4 f2fs_io \- f2fs ioctl utility
5 .SH DESCRIPTION
6 .B f2fs_io
7 is used to send various commands to the f2fs file system for
8 administrative purposes.
9 .SH "AVAILABLE COMMANDS"
10 .TP
11 \fBset_verity\fR \fI[file]\fR
12 Set the verity flags associated with the specified file.
13 .TP
14 \fBgetflags\fR \fI[file]\fR
15 Get the flags associated with the specified file.
16 .TP
17 \fBsetflags\fR \fI[flag] [file]\fR
18 Set an f2fs file on specified file.  The flag can be casefold,
19 compression, and nocompression.
20 .TP
21 \fBshutdown\fR \fIshutdown filesystem\fR
22 Freeze and stop all IOs for the file system mounted on
23 .IR dir.
24 The level parameter can be:
25 .RS 1.2i
26 .TP
27 0
28 going down with full sync
29 .TP
30 1
31 going down with checkpoint only
32 .TP
33 2
34 going down with no sync
35 .TP
36 3
37 going down with metadata flush
38 .TP
39 4
40 going down with fsck mark
41 .RE
42 .TP
43 \fBpinfile\fR \fI[get|set] [file]\fR
44 Get or set the pinning status on a file.
45 .TP
46 \fBfallocate\fR \fI[keep_size] [offset] [length] [file]\fR
47 Request that space be allocated on a file.  The
48 .I keep_size
49 parameter can be either 1 or 0.
50 .TP
51 \fBwrite\fR \fI[chunk_size in 4kb] [offset in chunk_size] [count] [pattern] [IO] [file_path]\fR
52 Write a given pattern to
53 .IR file_path .
54 The
55 .I pattern
56 parameter can be:
57 .RS 1.2in
58 .TP
59 .B zero
60 zeros
61 .TP
62 .B inc_num
63 incrementing numbers
64 .TP
65 .B rand
66 random numbers
67 .RE
68 .IP
69 The
70 .I IO
71 parameter can be:
72 .RS 1.2in
73 .TP
74 .B buffered
75 buffered I/O
76 .TP
77 .B dio
78 direct I/O
79 .TP
80 .B dsync
81 direct I/O with O_DSYNC
82 .RE
83 .TP
84 \fBread\fR \fI[chunk_size in 4kb] [offset in chunk_size] [count] [IO] [print_nbytes] [file_path]\fR
85 Read data in
86 .I file_path
87 and print
88 .IR print_nbytes .
89 The
90 .I IO
91 options can be:
92 .RS 1.2in
93 .TP
94 .B buffered
95 buffered I/O
96 .TP
97 .B dio
98 direct I/O
99 .RE
100 .TP
101 \fBfiemap\fR \fI[offset in 4kb] [count] [file_path]\fR
102 get block address in file
103 .TP
104 \fBgc_urgent\fR \fIdev [start|end|run] [time in sec]\fR
105 Start, end, or run gc_urgent for a given time period
106 .TP
107 \fBdefrag_file\fR \fI[start] [length] [file_path]\fR
108 Defragment a file.
109 .TP
110 \fBcopy\fR \fI[-d] [-m] [-s] [src_path] [dst_path]\fR
111 Copy file from src_path to dst_path.
112 The
113 .I pattern
114 parameter can be:
115 .RS 1.2in
116 .TP
117 .B -d
118 use direct I/O
119 .TP
120 .B -m
121 use mmap for source file
122 .TP
123 .B -s
124 use sendfile to transfer data
125 .RE
126 .TP
127 \fBget_cblocks\fR \fI[file]\fR
128 Get the number of compressed blocks.
129 .TP
130 \fBrelease_cblocks\fR \fI[file]\fR
131 Release compressed blocks to get free space.
132 .TP
133 \fBreserve_cblocks\fR \fI[file]\fR
134 Reserve free blocks to prepare decompressing blocks in the file.
135 .TP
136 \fBgc\fR \fI[sync_mode] [file]\fR
137 Trigger filesystem GC
138 .TP
139 \fBcheckpoint\fR \fI[file]\fR
140 Trigger filesystem checkpoint
141 .TP
142 \fBprecache_extents\fR \fI[file]\fR
143 Trigger precache extents
144 .TP
145 \fBmove_range\fR \fI[src_path] [dst_path] [src_start] [dst_start] [length]\fR
146 Move a range of data blocks from source file to destination file
147 .SH AUTHOR
148 This version of
149 .B f2fs_io
150 has been written by Jaegeuk Kim <jaegeuk@kernel.org>.
151 .SH AVAILABILITY
152 .B f2fs_io
153 is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.