1 What: /sys/fs/f2fs/<disk>/gc_max_sleep_time
3 Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
4 Description: Controls the maximum sleep time for gc_thread. Time
7 What: /sys/fs/f2fs/<disk>/gc_min_sleep_time
9 Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
10 Description: Controls the minimum sleep time for gc_thread. Time
13 What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
15 Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
16 Description: Controls the default sleep time for gc_thread. Time
19 What: /sys/fs/f2fs/<disk>/gc_idle
21 Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
22 Description: Controls the victim selection policy for garbage collection.
23 Setting gc_idle = 0(default) will disable this option. Setting:
25 =========== ===============================================
26 gc_idle = 1 will select the Cost Benefit approach & setting
27 gc_idle = 2 will select the greedy approach & setting
28 gc_idle = 3 will select the age-threshold based approach.
29 =========== ===============================================
31 What: /sys/fs/f2fs/<disk>/reclaim_segments
33 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
34 Description: This parameter controls the number of prefree segments to be
35 reclaimed. If the number of prefree segments is larger than
36 the number of segments in the proportion to the percentage
37 over total volume size, f2fs tries to conduct checkpoint to
38 reclaim the prefree segments to free segments.
39 By default, 5% over total # of segments.
41 What: /sys/fs/f2fs/<disk>/main_blkaddr
43 Contact: "Ramon Pantin" <pantin@google.com>
45 Shows first block address of MAIN area.
47 What: /sys/fs/f2fs/<disk>/ipu_policy
49 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
50 Description: Controls the in-place-update policy.
51 updates in f2fs. User can set:
53 ==== =================
57 0x08 F2FS_IPU_SSR_UTIL
61 ==== =================
63 Refer segment.h for details.
65 What: /sys/fs/f2fs/<disk>/min_ipu_util
67 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
68 Description: Controls the FS utilization condition for the in-place-update
69 policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
71 What: /sys/fs/f2fs/<disk>/min_fsync_blocks
73 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
74 Description: Controls the dirty page count condition for the in-place-update
77 What: /sys/fs/f2fs/<disk>/min_seq_blocks
79 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
80 Description: Controls the dirty page count condition for batched sequential
83 What: /sys/fs/f2fs/<disk>/min_hot_blocks
85 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
86 Description: Controls the dirty page count condition for redefining hot data.
88 What: /sys/fs/f2fs/<disk>/min_ssr_sections
90 Contact: "Chao Yu" <yuchao0@huawei.com>
91 Description: Controls the free section threshold to trigger SSR allocation.
92 If this is large, SSR mode will be enabled early.
94 What: /sys/fs/f2fs/<disk>/max_small_discards
96 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
97 Description: Controls the issue rate of discard commands that consist of small
98 blocks less than 2MB. The candidates to be discarded are cached until
99 checkpoint is triggered, and issued during the checkpoint.
100 By default, it is disabled with 0.
102 What: /sys/fs/f2fs/<disk>/discard_granularity
104 Contact: "Chao Yu" <yuchao0@huawei.com>
105 Description: Controls discard granularity of inner discard thread. Inner thread
106 will not issue discards with size that is smaller than granularity.
107 The unit size is one block(4KB), now only support configuring
108 in range of [1, 512]. Default value is 4(=16KB).
110 What: /sys/fs/f2fs/<disk>/umount_discard_timeout
112 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
113 Description: Set timeout to issue discard commands during umount.
116 What: /sys/fs/f2fs/<disk>/max_victim_search
118 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
119 Description: Controls the number of trials to find a victim segment
120 when conducting SSR and cleaning operations. The default value
121 is 4096 which covers 8GB block address range.
123 What: /sys/fs/f2fs/<disk>/migration_granularity
125 Contact: "Chao Yu" <yuchao0@huawei.com>
126 Description: Controls migration granularity of garbage collection on large
127 section, it can let GC move partial segment{s} of one section
128 in one GC cycle, so that dispersing heavy overhead GC to
129 multiple lightweight one.
131 What: /sys/fs/f2fs/<disk>/dir_level
133 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
134 Description: Controls the directory level for large directory. If a
135 directory has a number of files, it can reduce the file lookup
136 latency by increasing this dir_level value. Otherwise, it
137 needs to decrease this value to reduce the space overhead.
138 The default value is 0.
140 What: /sys/fs/f2fs/<disk>/ram_thresh
142 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
143 Description: Controls the memory footprint used by free nids and cached
144 nat entries. By default, 1 is set, which indicates
147 What: /sys/fs/f2fs/<disk>/batched_trim_sections
149 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
150 Description: Controls the trimming rate in batch mode.
153 What: /sys/fs/f2fs/<disk>/cp_interval
155 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
156 Description: Controls the checkpoint timing, set to 60 seconds by default.
158 What: /sys/fs/f2fs/<disk>/idle_interval
160 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
161 Description: Controls the idle timing of system, if there is no FS operation
162 during given interval.
163 Set to 5 seconds by default.
165 What: /sys/fs/f2fs/<disk>/discard_idle_interval
167 Contact: "Chao Yu" <yuchao0@huawei.com>
168 Contact: "Sahitya Tummala" <stummala@codeaurora.org>
169 Description: Controls the idle timing of discard thread given
173 What: /sys/fs/f2fs/<disk>/gc_idle_interval
175 Contact: "Chao Yu" <yuchao0@huawei.com>
176 Contact: "Sahitya Tummala" <stummala@codeaurora.org>
177 Description: Controls the idle timing for gc path. Set to 5 seconds by default.
179 What: /sys/fs/f2fs/<disk>/iostat_enable
181 Contact: "Chao Yu" <yuchao0@huawei.com>
182 Description: Controls to enable/disable IO stat.
184 What: /sys/fs/f2fs/<disk>/ra_nid_pages
186 Contact: "Chao Yu" <chao2.yu@samsung.com>
187 Description: Controls the count of nid pages to be readaheaded.
188 When building free nids, F2FS reads NAT blocks ahead for
189 speed up. Default is 0.
191 What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
193 Contact: "Chao Yu" <chao2.yu@samsung.com>
194 Description: Controls dirty nat entries ratio threshold, if current
195 ratio exceeds configured threshold, checkpoint will
196 be triggered for flushing dirty nat entries.
198 What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
200 Contact: "Shuoran Liu" <liushuoran@huawei.com>
201 Description: Shows total written kbytes issued to disk.
203 What: /sys/fs/f2fs/<disk>/features
205 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
206 Description: Shows all enabled features in current device.
208 What: /sys/fs/f2fs/<disk>/inject_rate
210 Contact: "Sheng Yong" <shengyong1@huawei.com>
211 Description: Controls the injection rate of arbitrary faults.
213 What: /sys/fs/f2fs/<disk>/inject_type
215 Contact: "Sheng Yong" <shengyong1@huawei.com>
216 Description: Controls the injection type of arbitrary faults.
218 What: /sys/fs/f2fs/<disk>/dirty_segments
220 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
221 Description: Shows the number of dirty segments.
223 What: /sys/fs/f2fs/<disk>/reserved_blocks
225 Contact: "Chao Yu" <yuchao0@huawei.com>
226 Description: Controls target reserved blocks in system, the threshold
227 is soft, it could exceed current available user space.
229 What: /sys/fs/f2fs/<disk>/current_reserved_blocks
231 Contact: "Yunlong Song" <yunlong.song@huawei.com>
232 Contact: "Chao Yu" <yuchao0@huawei.com>
233 Description: Shows current reserved blocks in system, it may be temporarily
234 smaller than target_reserved_blocks, but will gradually
235 increase to target_reserved_blocks when more free blocks are
238 What: /sys/fs/f2fs/<disk>/gc_urgent
240 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
241 Description: Do background GC agressively when set. When gc_urgent = 1,
242 background thread starts to do GC by given gc_urgent_sleep_time
243 interval. When gc_urgent = 2, F2FS will lower the bar of
244 checking idle in order to process outstanding discard commands
245 and GC a little bit aggressively. It is set to 0 by default.
247 What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
249 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
250 Description: Controls sleep time of GC urgent mode. Set to 500ms by default.
252 What: /sys/fs/f2fs/<disk>/readdir_ra
254 Contact: "Sheng Yong" <shengyong1@huawei.com>
255 Description: Controls readahead inode block in readdir. Enabled by default.
257 What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh
259 Contact: Jaegeuk Kim <jaegeuk@kernel.org>
260 Description: This indicates how many GC can be failed for the pinned
261 file. If it exceeds this, F2FS doesn't guarantee its pinning
262 state. 2048 trials is set by default.
264 What: /sys/fs/f2fs/<disk>/extension_list
266 Contact: "Chao Yu" <yuchao0@huawei.com>
267 Description: Used to control configure extension list:
268 - Query: cat /sys/fs/f2fs/<disk>/extension_list
269 - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
270 - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
271 - [h] means add/del hot file extension
272 - [c] means add/del cold file extension
274 What: /sys/fs/f2fs/<disk>/unusable
276 Contact: "Daniel Rosenberg" <drosen@google.com>
277 Description: If checkpoint=disable, it displays the number of blocks that
279 If checkpoint=enable it displays the enumber of blocks that
280 would be unusable if checkpoint=disable were to be set.
282 What: /sys/fs/f2fs/<disk>/encoding
284 Contact: "Daniel Rosenberg" <drosen@google.com>
285 Description: Displays name and version of the encoding set for the filesystem.
286 If no encoding is set, displays (none)
288 What: /sys/fs/f2fs/<disk>/free_segments
290 Contact: "Hridya Valsaraju" <hridya@google.com>
291 Description: Number of free segments in disk.
293 What: /sys/fs/f2fs/<disk>/cp_foreground_calls
295 Contact: "Hridya Valsaraju" <hridya@google.com>
296 Description: Number of checkpoint operations performed on demand. Available when
297 CONFIG_F2FS_STAT_FS=y.
299 What: /sys/fs/f2fs/<disk>/cp_background_calls
301 Contact: "Hridya Valsaraju" <hridya@google.com>
302 Description: Number of checkpoint operations performed in the background to
303 free segments. Available when CONFIG_F2FS_STAT_FS=y.
305 What: /sys/fs/f2fs/<disk>/gc_foreground_calls
307 Contact: "Hridya Valsaraju" <hridya@google.com>
308 Description: Number of garbage collection operations performed on demand.
309 Available when CONFIG_F2FS_STAT_FS=y.
311 What: /sys/fs/f2fs/<disk>/gc_background_calls
313 Contact: "Hridya Valsaraju" <hridya@google.com>
314 Description: Number of garbage collection operations triggered in background.
315 Available when CONFIG_F2FS_STAT_FS=y.
317 What: /sys/fs/f2fs/<disk>/moved_blocks_foreground
319 Contact: "Hridya Valsaraju" <hridya@google.com>
320 Description: Number of blocks moved by garbage collection in foreground.
321 Available when CONFIG_F2FS_STAT_FS=y.
323 What: /sys/fs/f2fs/<disk>/moved_blocks_background
325 Contact: "Hridya Valsaraju" <hridya@google.com>
326 Description: Number of blocks moved by garbage collection in background.
327 Available when CONFIG_F2FS_STAT_FS=y.
329 What: /sys/fs/f2fs/<disk>/avg_vblocks
331 Contact: "Hridya Valsaraju" <hridya@google.com>
332 Description: Average number of valid blocks.
333 Available when CONFIG_F2FS_STAT_FS=y.
335 What: /sys/fs/f2fs/<disk>/mounted_time_sec
337 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
338 Description: Show the mounted time in secs of this partition.
340 What: /sys/fs/f2fs/<disk>/data_io_flag
342 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
343 Description: Give a way to attach REQ_META|FUA to data writes
344 given temperature-based bits. Now the bits indicate:
346 +-------------------+-------------------+
347 | REQ_META | REQ_FUA |
348 +------+------+-----+------+------+-----+
349 | 5 | 4 | 3 | 2 | 1 | 0 |
350 +------+------+-----+------+------+-----+
351 | Cold | Warm | Hot | Cold | Warm | Hot |
352 +------+------+-----+------+------+-----+
354 What: /sys/fs/f2fs/<disk>/node_io_flag
356 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
357 Description: Give a way to attach REQ_META|FUA to node writes
358 given temperature-based bits. Now the bits indicate:
360 +-------------------+-------------------+
361 | REQ_META | REQ_FUA |
362 +------+------+-----+------+------+-----+
363 | 5 | 4 | 3 | 2 | 1 | 0 |
364 +------+------+-----+------+------+-----+
365 | Cold | Warm | Hot | Cold | Warm | Hot |
366 +------+------+-----+------+------+-----+
368 What: /sys/fs/f2fs/<disk>/iostat_period_ms
370 Contact: "Daeho Jeong" <daehojeong@google.com>
371 Description: Give a way to change iostat_period time. 3secs by default.
372 The new iostat trace gives stats gap given the period.
373 What: /sys/fs/f2fs/<disk>/max_io_bytes
375 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
376 Description: This gives a control to limit the bio size in f2fs.
377 Default is zero, which will follow underlying block layer limit,
378 whereas, if it has a certain bytes value, f2fs won't submit a
379 bio larger than that size.