1f2fs_io(8) System Administration Utilities f2fs_io(8)
2
3
4
6 f2fs_io - f2fs ioctl utility
7
9 f2fs_io is used to send various commands to the f2fs file system for
10 administrative purposes.
11
13 set_verity [file]
14 Set the verity flags associated with the specified file.
15
16 getflags [file]
17 Get the flags associated with the specified file.
18
19 setflags [flag] [file]
20 Set an f2fs file on specified file. The flag can be casefold,
21 compression, and nocompression.
22
23 shutdown shutdown filesystem
24 Freeze and stop all IOs for the file system mounted on dir. The
25 level parameter can be:
26
27 0 going down with full sync
28
29 1 going down with checkpoint only
30
31 2 going down with no sync
32
33 3 going down with metadata flush
34
35 4 going down with fsck mark
36
37 pinfile [get|set] [file]
38 Get or set the pinning status on a file.
39
40 fallocate [keep_size] [offset] [length] [file]
41 Request that space be allocated on a file. The keep_size param‐
42 eter can be either 1 or 0.
43
44 write [chunk_size in 4kb] [offset in chunk_size] [count] [pattern] [IO]
45 [file_path]
46 Write a given pattern to file_path. The pattern parameter can
47 be:
48
49 zero zeros
50
51 inc_num
52 incrementing numbers
53
54 rand random numbers
55
56 The IO parameter can be:
57
58 buffered
59 buffered I/O
60
61 dio direct I/O
62
63 read [chunk_size in 4kb] [offset in chunk_size] [count] [IO]
64 [print_nbytes] [file_path]
65 Read data in file_path and print print_nbytes. The IO options
66 can be:
67
68 buffered
69 buffered I/O
70
71 dio direct I/O
72
73 fiemap [offset in 4kb] [count] [file_path]
74 get block address in file
75
76 gc_urgent dev [start|end|run] [time in sec]
77 Start, end, or run gc_urgent for a given time period
78
79 defrag_file [start] [length] [file_path]
80 Defragment a file.
81
82 copy [-d] [-m] [-s] [src_path] [dst_path]
83 Copy file from src_path to dst_path. The pattern parameter can
84 be:
85
86 -d use direct I/O
87
88 -m use mmap for source file
89
90 -s use sendfile to transfer data
91
92 get_cblocks [file]
93 Get the number of compressed blocks.
94
95 release_cblocks [file]
96 Release compressed blocks to get free space.
97
98 reserve_cblocks [file]
99 Reserve free blocks to prepare decompressing blocks in the file.
100
102 This version of f2fs_io has been written by Jaegeuk Kim <jaegeuk@ker‐
103 nel.org>.
104
106 f2fs_io is available from git://git.kernel.org/pub/scm/linux/ker‐
107 nel/git/jaegeuk/f2fs-tools.git.
108
109
110
111f2fs-tools March 2020 f2fs_io(8)