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>
44 Description: Shows first block address of MAIN area.
46 What: /sys/fs/f2fs/<disk>/ipu_policy
48 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
49 Description: Controls the in-place-update policy.
50 updates in f2fs. User can set:
52 ===== =============== ===================================================
53 value policy description
54 0x00 DISABLE disable IPU(=default option in LFS mode)
55 0x01 FORCE all the time
56 0x02 SSR if SSR mode is activated
57 0x04 UTIL if FS utilization is over threshold
58 0x08 SSR_UTIL if SSR mode is activated and FS utilization is over
60 0x10 FSYNC activated in fsync path only for high performance
61 flash storages. IPU will be triggered only if the
62 # of dirty pages over min_fsync_blocks.
64 0x20 ASYNC do IPU given by asynchronous write requests
65 0x40 NOCACHE disable IPU bio cache
66 0x80 HONOR_OPU_WRITE use OPU write prior to IPU write if inode has
68 ===== =============== ===================================================
70 Refer segment.h for details.
72 What: /sys/fs/f2fs/<disk>/min_ipu_util
74 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
75 Description: Controls the FS utilization condition for the in-place-update
76 policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
78 What: /sys/fs/f2fs/<disk>/min_fsync_blocks
80 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
81 Description: Controls the dirty page count condition for the in-place-update
84 What: /sys/fs/f2fs/<disk>/min_seq_blocks
86 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
87 Description: Controls the dirty page count condition for batched sequential
90 What: /sys/fs/f2fs/<disk>/min_hot_blocks
92 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
93 Description: Controls the dirty page count condition for redefining hot data.
95 What: /sys/fs/f2fs/<disk>/min_ssr_sections
97 Contact: "Chao Yu" <yuchao0@huawei.com>
98 Description: Controls the free section threshold to trigger SSR allocation.
99 If this is large, SSR mode will be enabled early.
101 What: /sys/fs/f2fs/<disk>/max_small_discards
103 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
104 Description: Controls the issue rate of discard commands that consist of small
105 blocks less than 2MB. The candidates to be discarded are cached during
106 checkpoint, and issued by issue_discard thread after checkpoint.
107 It is enabled by default.
109 What: /sys/fs/f2fs/<disk>/max_ordered_discard
111 Contact: "Yangtao Li" <frank.li@vivo.com>
112 Description: Controls the maximum ordered discard, the unit size is one block(4KB).
113 Set it to 16 by default.
115 What: /sys/fs/f2fs/<disk>/max_discard_request
117 Contact: "Konstantin Vyshetsky" <vkon@google.com>
118 Description: Controls the number of discards a thread will issue at a time.
119 Higher number will allow the discard thread to finish its work
120 faster, at the cost of higher latency for incoming I/O.
122 What: /sys/fs/f2fs/<disk>/min_discard_issue_time
124 Contact: "Konstantin Vyshetsky" <vkon@google.com>
125 Description: Controls the interval the discard thread will wait between
126 issuing discard requests when there are discards to be issued and
127 no I/O aware interruptions occur.
129 What: /sys/fs/f2fs/<disk>/mid_discard_issue_time
131 Contact: "Konstantin Vyshetsky" <vkon@google.com>
132 Description: Controls the interval the discard thread will wait between
133 issuing discard requests when there are discards to be issued and
134 an I/O aware interruption occurs.
136 What: /sys/fs/f2fs/<disk>/max_discard_issue_time
138 Contact: "Konstantin Vyshetsky" <vkon@google.com>
139 Description: Controls the interval the discard thread will wait when there are
140 no discard operations to be issued.
142 What: /sys/fs/f2fs/<disk>/discard_granularity
144 Contact: "Chao Yu" <yuchao0@huawei.com>
145 Description: Controls discard granularity of inner discard thread. Inner thread
146 will not issue discards with size that is smaller than granularity.
147 The unit size is one block(4KB), now only support configuring
148 in range of [1, 512]. Default value is 16.
149 For small devices, default value is 1.
151 What: /sys/fs/f2fs/<disk>/umount_discard_timeout
153 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
154 Description: Set timeout to issue discard commands during umount.
157 What: /sys/fs/f2fs/<disk>/pending_discard
159 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
160 Description: Shows the number of pending discard commands in the queue.
162 What: /sys/fs/f2fs/<disk>/max_victim_search
164 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
165 Description: Controls the number of trials to find a victim segment
166 when conducting SSR and cleaning operations. The default value
167 is 4096 which covers 8GB block address range.
169 What: /sys/fs/f2fs/<disk>/migration_granularity
171 Contact: "Chao Yu" <yuchao0@huawei.com>
172 Description: Controls migration granularity of garbage collection on large
173 section, it can let GC move partial segment{s} of one section
174 in one GC cycle, so that dispersing heavy overhead GC to
175 multiple lightweight one.
177 What: /sys/fs/f2fs/<disk>/dir_level
179 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
180 Description: Controls the directory level for large directory. If a
181 directory has a number of files, it can reduce the file lookup
182 latency by increasing this dir_level value. Otherwise, it
183 needs to decrease this value to reduce the space overhead.
184 The default value is 0.
186 What: /sys/fs/f2fs/<disk>/ram_thresh
188 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
189 Description: Controls the memory footprint used by free nids and cached
190 nat entries. By default, 1 is set, which indicates
193 What: /sys/fs/f2fs/<disk>/cp_interval
195 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
196 Description: Controls the checkpoint timing, set to 60 seconds by default.
198 What: /sys/fs/f2fs/<disk>/idle_interval
200 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
201 Description: Controls the idle timing of system, if there is no FS operation
202 during given interval.
203 Set to 5 seconds by default.
205 What: /sys/fs/f2fs/<disk>/discard_idle_interval
207 Contact: "Chao Yu" <yuchao0@huawei.com>
208 Contact: "Sahitya Tummala" <stummala@codeaurora.org>
209 Description: Controls the idle timing of discard thread given
213 What: /sys/fs/f2fs/<disk>/gc_idle_interval
215 Contact: "Chao Yu" <yuchao0@huawei.com>
216 Contact: "Sahitya Tummala" <stummala@codeaurora.org>
217 Description: Controls the idle timing for gc path. Set to 5 seconds by default.
219 What: /sys/fs/f2fs/<disk>/iostat_enable
221 Contact: "Chao Yu" <yuchao0@huawei.com>
222 Description: Controls to enable/disable IO stat.
224 What: /sys/fs/f2fs/<disk>/ra_nid_pages
226 Contact: "Chao Yu" <chao2.yu@samsung.com>
227 Description: Controls the count of nid pages to be readaheaded.
228 When building free nids, F2FS reads NAT blocks ahead for
229 speed up. Default is 0.
231 What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
233 Contact: "Chao Yu" <chao2.yu@samsung.com>
234 Description: Controls dirty nat entries ratio threshold, if current
235 ratio exceeds configured threshold, checkpoint will
236 be triggered for flushing dirty nat entries.
238 What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
240 Contact: "Shuoran Liu" <liushuoran@huawei.com>
241 Description: Shows total written kbytes issued to disk.
243 What: /sys/fs/f2fs/<disk>/features
245 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
246 Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/>
247 Shows all enabled features in current device.
249 encryption, blkzoned, extra_attr, projquota, inode_checksum,
250 flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
251 verity, sb_checksum, casefold, readonly, compression, pin_file.
253 What: /sys/fs/f2fs/<disk>/feature_list/
255 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
256 Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule.
257 Supported on-disk features:
258 encryption, block_zoned (aka blkzoned), extra_attr,
259 project_quota (aka projquota), inode_checksum,
260 flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
261 verity, sb_checksum, casefold, readonly, compression.
262 Note that, pin_file is moved into /sys/fs/f2fs/features/.
264 What: /sys/fs/f2fs/features/
266 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
267 Description: Shows all enabled kernel features.
269 encryption, block_zoned, extra_attr, project_quota,
270 inode_checksum, flexible_inline_xattr, quota_ino,
271 inode_crtime, lost_found, verity, sb_checksum,
272 casefold, readonly, compression, test_dummy_encryption_v2,
273 atomic_write, pin_file, encrypted_casefold.
275 What: /sys/fs/f2fs/<disk>/inject_rate
277 Contact: "Sheng Yong" <shengyong1@huawei.com>
278 Description: Controls the injection rate of arbitrary faults.
280 What: /sys/fs/f2fs/<disk>/inject_type
282 Contact: "Sheng Yong" <shengyong1@huawei.com>
283 Description: Controls the injection type of arbitrary faults.
285 What: /sys/fs/f2fs/<disk>/dirty_segments
287 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
288 Description: Shows the number of dirty segments.
290 What: /sys/fs/f2fs/<disk>/reserved_blocks
292 Contact: "Chao Yu" <yuchao0@huawei.com>
293 Description: Controls target reserved blocks in system, the threshold
294 is soft, it could exceed current available user space.
296 What: /sys/fs/f2fs/<disk>/current_reserved_blocks
298 Contact: "Yunlong Song" <yunlong.song@huawei.com>
299 Contact: "Chao Yu" <yuchao0@huawei.com>
300 Description: Shows current reserved blocks in system, it may be temporarily
301 smaller than target_reserved_blocks, but will gradually
302 increase to target_reserved_blocks when more free blocks are
305 What: /sys/fs/f2fs/<disk>/gc_urgent
307 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
308 Description: Do background GC aggressively when set. Set to 0 by default.
309 gc urgent high(1): does GC forcibly in a period of given
310 gc_urgent_sleep_time and ignores I/O idling check. uses greedy
311 GC approach and turns SSR mode on.
312 gc urgent low(2): lowers the bar of checking I/O idling in
313 order to process outstanding discard commands and GC a
314 little bit aggressively. uses cost benefit GC approach.
315 gc urgent mid(3): does GC forcibly in a period of given
316 gc_urgent_sleep_time and executes a mid level of I/O idling check.
317 uses cost benefit GC approach.
319 What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
321 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
322 Description: Controls sleep time of GC urgent mode. Set to 500ms by default.
324 What: /sys/fs/f2fs/<disk>/readdir_ra
326 Contact: "Sheng Yong" <shengyong1@huawei.com>
327 Description: Controls readahead inode block in readdir. Enabled by default.
329 What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh
331 Contact: Jaegeuk Kim <jaegeuk@kernel.org>
332 Description: This indicates how many GC can be failed for the pinned
333 file. If it exceeds this, F2FS doesn't guarantee its pinning
334 state. 2048 trials is set by default.
336 What: /sys/fs/f2fs/<disk>/extension_list
338 Contact: "Chao Yu" <yuchao0@huawei.com>
339 Description: Used to control configure extension list:
340 - Query: cat /sys/fs/f2fs/<disk>/extension_list
341 - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
342 - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
343 - [h] means add/del hot file extension
344 - [c] means add/del cold file extension
346 What: /sys/fs/f2fs/<disk>/unusable
348 Contact: "Daniel Rosenberg" <drosen@google.com>
349 Description: If checkpoint=disable, it displays the number of blocks that
351 If checkpoint=enable it displays the number of blocks that
352 would be unusable if checkpoint=disable were to be set.
354 What: /sys/fs/f2fs/<disk>/encoding
356 Contact: "Daniel Rosenberg" <drosen@google.com>
357 Description: Displays name and version of the encoding set for the filesystem.
358 If no encoding is set, displays (none)
360 What: /sys/fs/f2fs/<disk>/free_segments
362 Contact: "Hridya Valsaraju" <hridya@google.com>
363 Description: Number of free segments in disk.
365 What: /sys/fs/f2fs/<disk>/cp_foreground_calls
367 Contact: "Hridya Valsaraju" <hridya@google.com>
368 Description: Number of checkpoint operations performed on demand. Available when
369 CONFIG_F2FS_STAT_FS=y.
371 What: /sys/fs/f2fs/<disk>/cp_background_calls
373 Contact: "Hridya Valsaraju" <hridya@google.com>
374 Description: Number of checkpoint operations performed in the background to
375 free segments. Available when CONFIG_F2FS_STAT_FS=y.
377 What: /sys/fs/f2fs/<disk>/gc_foreground_calls
379 Contact: "Hridya Valsaraju" <hridya@google.com>
380 Description: Number of garbage collection operations performed on demand.
381 Available when CONFIG_F2FS_STAT_FS=y.
383 What: /sys/fs/f2fs/<disk>/gc_background_calls
385 Contact: "Hridya Valsaraju" <hridya@google.com>
386 Description: Number of garbage collection operations triggered in background.
387 Available when CONFIG_F2FS_STAT_FS=y.
389 What: /sys/fs/f2fs/<disk>/moved_blocks_foreground
391 Contact: "Hridya Valsaraju" <hridya@google.com>
392 Description: Number of blocks moved by garbage collection in foreground.
393 Available when CONFIG_F2FS_STAT_FS=y.
395 What: /sys/fs/f2fs/<disk>/moved_blocks_background
397 Contact: "Hridya Valsaraju" <hridya@google.com>
398 Description: Number of blocks moved by garbage collection in background.
399 Available when CONFIG_F2FS_STAT_FS=y.
401 What: /sys/fs/f2fs/<disk>/avg_vblocks
403 Contact: "Hridya Valsaraju" <hridya@google.com>
404 Description: Average number of valid blocks.
405 Available when CONFIG_F2FS_STAT_FS=y.
407 What: /sys/fs/f2fs/<disk>/mounted_time_sec
409 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
410 Description: Show the mounted time in secs of this partition.
412 What: /sys/fs/f2fs/<disk>/data_io_flag
414 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
415 Description: Give a way to attach REQ_META|FUA to data writes
416 given temperature-based bits. Now the bits indicate:
418 +-------------------+-------------------+
419 | REQ_META | REQ_FUA |
420 +------+------+-----+------+------+-----+
421 | 5 | 4 | 3 | 2 | 1 | 0 |
422 +------+------+-----+------+------+-----+
423 | Cold | Warm | Hot | Cold | Warm | Hot |
424 +------+------+-----+------+------+-----+
426 What: /sys/fs/f2fs/<disk>/node_io_flag
428 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
429 Description: Give a way to attach REQ_META|FUA to node writes
430 given temperature-based bits. Now the bits indicate:
432 +-------------------+-------------------+
433 | REQ_META | REQ_FUA |
434 +------+------+-----+------+------+-----+
435 | 5 | 4 | 3 | 2 | 1 | 0 |
436 +------+------+-----+------+------+-----+
437 | Cold | Warm | Hot | Cold | Warm | Hot |
438 +------+------+-----+------+------+-----+
440 What: /sys/fs/f2fs/<disk>/iostat_period_ms
442 Contact: "Daeho Jeong" <daehojeong@google.com>
443 Description: Give a way to change iostat_period time. 3secs by default.
444 The new iostat trace gives stats gap given the period.
445 What: /sys/fs/f2fs/<disk>/max_io_bytes
447 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
448 Description: This gives a control to limit the bio size in f2fs.
449 Default is zero, which will follow underlying block layer limit,
450 whereas, if it has a certain bytes value, f2fs won't submit a
451 bio larger than that size.
453 What: /sys/fs/f2fs/<disk>/stat/sb_status
455 Contact: "Chao Yu" <yuchao0@huawei.com>
456 Description: Show status of f2fs superblock in real time.
458 ====== ===================== =================================
459 value sb status macro description
460 0x1 SBI_IS_DIRTY dirty flag for checkpoint
461 0x2 SBI_IS_CLOSE specify unmounting
462 0x4 SBI_NEED_FSCK need fsck.f2fs to fix
463 0x8 SBI_POR_DOING recovery is doing or not
464 0x10 SBI_NEED_SB_WRITE need to recover superblock
465 0x20 SBI_NEED_CP need to checkpoint
466 0x40 SBI_IS_SHUTDOWN shutdown by ioctl
467 0x80 SBI_IS_RECOVERED recovered orphan/data
468 0x100 SBI_CP_DISABLED CP was disabled last mount
469 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly
470 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP
471 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP
472 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
473 0x2000 SBI_IS_RESIZEFS resizefs is in process
474 0x4000 SBI_IS_FREEZING freefs is in process
475 ====== ===================== =================================
477 What: /sys/fs/f2fs/<disk>/stat/cp_status
479 Contact: "Chao Yu" <chao.yu@oppo.com>
480 Description: Show status of f2fs checkpoint in real time.
482 =============================== ==============================
484 CP_UMOUNT_FLAG 0x00000001
485 CP_ORPHAN_PRESENT_FLAG 0x00000002
486 CP_COMPACT_SUM_FLAG 0x00000004
487 CP_ERROR_FLAG 0x00000008
488 CP_FSCK_FLAG 0x00000010
489 CP_FASTBOOT_FLAG 0x00000020
490 CP_CRC_RECOVERY_FLAG 0x00000040
491 CP_NAT_BITS_FLAG 0x00000080
492 CP_TRIMMED_FLAG 0x00000100
493 CP_NOCRC_RECOVERY_FLAG 0x00000200
494 CP_LARGE_NAT_BITMAP_FLAG 0x00000400
495 CP_QUOTA_NEED_FSCK_FLAG 0x00000800
496 CP_DISABLED_FLAG 0x00001000
497 CP_DISABLED_QUICK_FLAG 0x00002000
498 CP_RESIZEFS_FLAG 0x00004000
499 =============================== ==============================
501 What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio
503 Contact: "Daeho Jeong" <daehojeong@google.com>
504 Description: Give a way to change checkpoint merge daemon's io priority.
505 Its default value is "be,3", which means "BE" I/O class and
506 I/O priority "3". We can select the class between "rt" and "be",
507 and set the I/O priority within valid range of it. "," delimiter
508 is necessary in between I/O class and priority number.
510 What: /sys/fs/f2fs/<disk>/ovp_segments
512 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
513 Description: Shows the number of overprovision segments.
515 What: /sys/fs/f2fs/<disk>/compr_written_block
517 Contact: "Daeho Jeong" <daehojeong@google.com>
518 Description: Show the block count written after compression since mount. Note
519 that when the compressed blocks are deleted, this count doesn't
520 decrease. If you write "0" here, you can initialize
521 compr_written_block and compr_saved_block to "0".
523 What: /sys/fs/f2fs/<disk>/compr_saved_block
525 Contact: "Daeho Jeong" <daehojeong@google.com>
526 Description: Show the saved block count with compression since mount. Note
527 that when the compressed blocks are deleted, this count doesn't
528 decrease. If you write "0" here, you can initialize
529 compr_written_block and compr_saved_block to "0".
531 What: /sys/fs/f2fs/<disk>/compr_new_inode
533 Contact: "Daeho Jeong" <daehojeong@google.com>
534 Description: Show the count of inode newly enabled for compression since mount.
535 Note that when the compression is disabled for the files, this count
536 doesn't decrease. If you write "0" here, you can initialize
537 compr_new_inode to "0".
539 What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio
541 Contact: "Chao Yu" <yuchao0@huawei.com>
542 Description: When ATGC is on, it controls candidate ratio in order to limit total
543 number of potential victim in all candidates, the value should be in
544 range of [0, 100], by default it was initialized as 20(%).
546 What: /sys/fs/f2fs/<disk>/atgc_candidate_count
548 Contact: "Chao Yu" <yuchao0@huawei.com>
549 Description: When ATGC is on, it controls candidate count in order to limit total
550 number of potential victim in all candidates, by default it was
551 initialized as 10 (sections).
553 What: /sys/fs/f2fs/<disk>/atgc_age_weight
555 Contact: "Chao Yu" <yuchao0@huawei.com>
556 Description: When ATGC is on, it controls age weight to balance weight proportion
557 in between aging and valid blocks, the value should be in range of
558 [0, 100], by default it was initialized as 60(%).
560 What: /sys/fs/f2fs/<disk>/atgc_age_threshold
562 Contact: "Chao Yu" <yuchao0@huawei.com>
563 Description: When ATGC is on, it controls age threshold to bypass GCing young
564 candidates whose age is not beyond the threshold, by default it was
565 initialized as 604800 seconds (equals to 7 days).
567 What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments
569 Contact: "Daeho Jeong" <daehojeong@google.com>
570 Description: Show how many segments have been reclaimed by GC during a specific
571 GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy,
572 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid)
573 You can re-initialize this value to "0".
575 What: /sys/fs/f2fs/<disk>/gc_segment_mode
577 Contact: "Daeho Jeong" <daehojeong@google.com>
578 Description: You can control for which gc mode the "gc_reclaimed_segments" node shows.
579 Refer to the description of the modes in "gc_reclaimed_segments".
581 What: /sys/fs/f2fs/<disk>/seq_file_ra_mul
583 Contact: "Daeho Jeong" <daehojeong@google.com>
584 Description: You can control the multiplier value of bdi device readahead window size
585 between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option.
587 What: /sys/fs/f2fs/<disk>/max_fragment_chunk
589 Contact: "Daeho Jeong" <daehojeong@google.com>
590 Description: With "mode=fragment:block" mount options, we can scatter block allocation.
591 f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
592 in the length of 1..<max_fragment_hole> by turns. This value can be set
593 between 1..512 and the default value is 4.
595 What: /sys/fs/f2fs/<disk>/max_fragment_hole
597 Contact: "Daeho Jeong" <daehojeong@google.com>
598 Description: With "mode=fragment:block" mount options, we can scatter block allocation.
599 f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
600 in the length of 1..<max_fragment_hole> by turns. This value can be set
601 between 1..512 and the default value is 4.
603 What: /sys/fs/f2fs/<disk>/gc_remaining_trials
605 Contact: "Yangtao Li" <frank.li@vivo.com>
606 Description: You can set the trial count limit for GC urgent and idle mode with this value.
607 If GC thread gets to the limit, the mode will turn back to GC normal mode.
608 By default, the value is zero, which means there is no limit like before.
610 What: /sys/fs/f2fs/<disk>/max_roll_forward_node_blocks
612 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
613 Description: Controls max # of node block writes to be used for roll forward
614 recovery. This can limit the roll forward recovery time.
616 What: /sys/fs/f2fs/<disk>/unusable_blocks_per_sec
618 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
619 Description: Shows the number of unusable blocks in a section which was defined by
620 the zone capacity reported by underlying zoned device.
622 What: /sys/fs/f2fs/<disk>/current_atomic_write
624 Contact: "Daeho Jeong" <daehojeong@google.com>
625 Description: Show the total current atomic write block count, which is not committed yet.
626 This is a read-only entry.
628 What: /sys/fs/f2fs/<disk>/peak_atomic_write
630 Contact: "Daeho Jeong" <daehojeong@google.com>
631 Description: Show the peak value of total current atomic write block count after boot.
632 If you write "0" here, you can initialize to "0".
634 What: /sys/fs/f2fs/<disk>/committed_atomic_block
636 Contact: "Daeho Jeong" <daehojeong@google.com>
637 Description: Show the accumulated total committed atomic write block count after boot.
638 If you write "0" here, you can initialize to "0".
640 What: /sys/fs/f2fs/<disk>/revoked_atomic_block
642 Contact: "Daeho Jeong" <daehojeong@google.com>
643 Description: Show the accumulated total revoked atomic write block count after boot.
644 If you write "0" here, you can initialize to "0".
646 What: /sys/fs/f2fs/<disk>/gc_mode
648 Contact: "Yangtao Li" <frank.li@vivo.com>
649 Description: Show the current gc_mode as a string.
650 This is a read-only entry.
652 What: /sys/fs/f2fs/<disk>/discard_urgent_util
654 Contact: "Yangtao Li" <frank.li@vivo.com>
655 Description: When space utilization exceeds this, do background DISCARD aggressively.
656 Does DISCARD forcibly in a period of given min_discard_issue_time when the number
657 of discards is not 0 and set discard granularity to 1.
660 What: /sys/fs/f2fs/<disk>/hot_data_age_threshold
662 Contact: "Ping Xiong" <xiongping1@xiaomi.com>
663 Description: When DATA SEPARATION is on, it controls the age threshold to indicate
664 the data blocks as hot. By default it was initialized as 262144 blocks
667 What: /sys/fs/f2fs/<disk>/warm_data_age_threshold
669 Contact: "Ping Xiong" <xiongping1@xiaomi.com>
670 Description: When DATA SEPARATION is on, it controls the age threshold to indicate
671 the data blocks as warm. By default it was initialized as 2621440 blocks
674 What: /sys/fs/f2fs/<disk>/fault_rate
676 Contact: "Sheng Yong" <shengyong@oppo.com>
677 Contact: "Chao Yu" <chao@kernel.org>
678 Description: Enable fault injection in all supported types with
679 specified injection rate.
681 What: /sys/fs/f2fs/<disk>/fault_type
683 Contact: "Sheng Yong" <shengyong@oppo.com>
684 Contact: "Chao Yu" <chao@kernel.org>
685 Description: Support configuring fault injection type, should be
686 enabled with fault_injection option, fault type value
687 is shown below, it supports single or combined type.
689 =================== ===========
691 =================== ===========
692 FAULT_KMALLOC 0x000000001
693 FAULT_KVMALLOC 0x000000002
694 FAULT_PAGE_ALLOC 0x000000004
695 FAULT_PAGE_GET 0x000000008
696 FAULT_ALLOC_BIO 0x000000010 (obsolete)
697 FAULT_ALLOC_NID 0x000000020
698 FAULT_ORPHAN 0x000000040
699 FAULT_BLOCK 0x000000080
700 FAULT_DIR_DEPTH 0x000000100
701 FAULT_EVICT_INODE 0x000000200
702 FAULT_TRUNCATE 0x000000400
703 FAULT_READ_IO 0x000000800
704 FAULT_CHECKPOINT 0x000001000
705 FAULT_DISCARD 0x000002000
706 FAULT_WRITE_IO 0x000004000
707 FAULT_SLAB_ALLOC 0x000008000
708 FAULT_DQUOT_INIT 0x000010000
709 FAULT_LOCK_OP 0x000020000
710 FAULT_BLKADDR 0x000040000
711 =================== ===========
713 What: /sys/fs/f2fs/<disk>/discard_io_aware_gran
715 Contact: "Yangtao Li" <frank.li@vivo.com>
716 Description: Controls background discard granularity of inner discard thread
717 when is not in idle. Inner thread will not issue discards with size that
718 is smaller than granularity. The unit size is one block(4KB), now only
719 support configuring in range of [0, 512].
722 What: /sys/fs/f2fs/<disk>/last_age_weight
724 Contact: "Ping Xiong" <xiongping1@xiaomi.com>
725 Description: When DATA SEPARATION is on, it controls the weight of last data block age.
727 What: /sys/fs/f2fs/<disk>/compress_watermark
729 Contact: "Yangtao Li" <frank.li@vivo.com>
730 Description: When compress cache is on, it controls free memory watermark
731 in order to limit caching compress page. If free memory is lower
732 than watermark, then deny caching compress page. The value should be in
733 range of (0, 100], by default it was initialized as 20(%).
735 What: /sys/fs/f2fs/<disk>/compress_percent
737 Contact: "Yangtao Li" <frank.li@vivo.com>
738 Description: When compress cache is on, it controls cached page
739 percent(compress pages / free_ram) in order to limit caching compress page.
740 If cached page percent exceed threshold, then deny caching compress page.
741 The value should be in range of (0, 100], by default it was initialized