822 lines · plain
1What: /sys/fs/f2fs/<disk>/gc_max_sleep_time2Date: July 20133Contact: "Namjae Jeon" <namjae.jeon@samsung.com>4Description: Controls the maximum sleep time for gc_thread. Time5 is in milliseconds.6 7What: /sys/fs/f2fs/<disk>/gc_min_sleep_time8Date: July 20139Contact: "Namjae Jeon" <namjae.jeon@samsung.com>10Description: Controls the minimum sleep time for gc_thread. Time11 is in milliseconds.12 13What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time14Date: July 201315Contact: "Namjae Jeon" <namjae.jeon@samsung.com>16Description: Controls the default sleep time for gc_thread. Time17 is in milliseconds.18 19What: /sys/fs/f2fs/<disk>/gc_idle20Date: July 201321Contact: "Namjae Jeon" <namjae.jeon@samsung.com>22Description: Controls the victim selection policy for garbage collection.23 Setting gc_idle = 0(default) will disable this option. Setting:24 25 =========== ===============================================26 gc_idle = 1 will select the Cost Benefit approach & setting27 gc_idle = 2 will select the greedy approach & setting28 gc_idle = 3 will select the age-threshold based approach.29 =========== ===============================================30 31What: /sys/fs/f2fs/<disk>/reclaim_segments32Date: October 201333Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>34Description: This parameter controls the number of prefree segments to be35 reclaimed. If the number of prefree segments is larger than36 the number of segments in the proportion to the percentage37 over total volume size, f2fs tries to conduct checkpoint to38 reclaim the prefree segments to free segments.39 By default, 5% over total # of segments.40 41What: /sys/fs/f2fs/<disk>/main_blkaddr42Date: November 201943Contact: "Ramon Pantin" <pantin@google.com>44Description: Shows first block address of MAIN area.45 46What: /sys/fs/f2fs/<disk>/ipu_policy47Date: November 201348Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>49Description: Controls the in-place-update policy.50 updates in f2fs. User can set:51 52 ===== =============== ===================================================53 value policy description54 0x00 DISABLE disable IPU(=default option in LFS mode)55 0x01 FORCE all the time56 0x02 SSR if SSR mode is activated57 0x04 UTIL if FS utilization is over threshold58 0x08 SSR_UTIL if SSR mode is activated and FS utilization is over59 threshold60 0x10 FSYNC activated in fsync path only for high performance61 flash storages. IPU will be triggered only if the62 # of dirty pages over min_fsync_blocks.63 (=default option)64 0x20 ASYNC do IPU given by asynchronous write requests65 0x40 NOCACHE disable IPU bio cache66 0x80 HONOR_OPU_WRITE use OPU write prior to IPU write if inode has67 FI_OPU_WRITE flag68 ===== =============== ===================================================69 70 Refer segment.h for details.71 72What: /sys/fs/f2fs/<disk>/min_ipu_util73Date: November 201374Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>75Description: Controls the FS utilization condition for the in-place-update76 policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.77 78What: /sys/fs/f2fs/<disk>/min_fsync_blocks79Date: September 201480Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>81Description: Controls the dirty page count condition for the in-place-update82 policies.83 84What: /sys/fs/f2fs/<disk>/min_seq_blocks85Date: August 201886Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>87Description: Controls the dirty page count condition for batched sequential88 writes in writepages.89 90What: /sys/fs/f2fs/<disk>/min_hot_blocks91Date: March 201792Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>93Description: Controls the dirty page count condition for redefining hot data.94 95What: /sys/fs/f2fs/<disk>/min_ssr_sections96Date: October 201797Contact: "Chao Yu" <yuchao0@huawei.com>98Description: Controls the free section threshold to trigger SSR allocation.99 If this is large, SSR mode will be enabled early.100 101What: /sys/fs/f2fs/<disk>/max_small_discards102Date: November 2013103Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>104Description: Controls the issue rate of discard commands that consist of small105 blocks less than 2MB. The candidates to be discarded are cached during106 checkpoint, and issued by issue_discard thread after checkpoint.107 It is enabled by default.108 109What: /sys/fs/f2fs/<disk>/max_ordered_discard110Date: October 2022111Contact: "Yangtao Li" <frank.li@vivo.com>112Description: Controls the maximum ordered discard, the unit size is one block(4KB).113 Set it to 16 by default.114 115What: /sys/fs/f2fs/<disk>/max_discard_request116Date: December 2021117Contact: "Konstantin Vyshetsky" <vkon@google.com>118Description: Controls the number of discards a thread will issue at a time.119 Higher number will allow the discard thread to finish its work120 faster, at the cost of higher latency for incoming I/O.121 122What: /sys/fs/f2fs/<disk>/min_discard_issue_time123Date: December 2021124Contact: "Konstantin Vyshetsky" <vkon@google.com>125Description: Controls the interval the discard thread will wait between126 issuing discard requests when there are discards to be issued and127 no I/O aware interruptions occur.128 129What: /sys/fs/f2fs/<disk>/mid_discard_issue_time130Date: December 2021131Contact: "Konstantin Vyshetsky" <vkon@google.com>132Description: Controls the interval the discard thread will wait between133 issuing discard requests when there are discards to be issued and134 an I/O aware interruption occurs.135 136What: /sys/fs/f2fs/<disk>/max_discard_issue_time137Date: December 2021138Contact: "Konstantin Vyshetsky" <vkon@google.com>139Description: Controls the interval the discard thread will wait when there are140 no discard operations to be issued.141 142What: /sys/fs/f2fs/<disk>/discard_granularity143Date: July 2017144Contact: "Chao Yu" <yuchao0@huawei.com>145Description: Controls discard granularity of inner discard thread. Inner thread146 will not issue discards with size that is smaller than granularity.147 The unit size is one block(4KB), now only support configuring148 in range of [1, 512]. Default value is 16.149 For small devices, default value is 1.150 151What: /sys/fs/f2fs/<disk>/umount_discard_timeout152Date: January 2019153Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>154Description: Set timeout to issue discard commands during umount.155 Default: 5 secs156 157What: /sys/fs/f2fs/<disk>/pending_discard158Date: November 2021159Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>160Description: Shows the number of pending discard commands in the queue.161 162What: /sys/fs/f2fs/<disk>/max_victim_search163Date: January 2014164Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>165Description: Controls the number of trials to find a victim segment166 when conducting SSR and cleaning operations. The default value167 is 4096 which covers 8GB block address range.168 169What: /sys/fs/f2fs/<disk>/migration_granularity170Date: October 2018171Contact: "Chao Yu" <yuchao0@huawei.com>172Description: Controls migration granularity of garbage collection on large173 section, it can let GC move partial segment{s} of one section174 in one GC cycle, so that dispersing heavy overhead GC to175 multiple lightweight one.176 177What: /sys/fs/f2fs/<disk>/dir_level178Date: March 2014179Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>180Description: Controls the directory level for large directory. If a181 directory has a number of files, it can reduce the file lookup182 latency by increasing this dir_level value. Otherwise, it183 needs to decrease this value to reduce the space overhead.184 The default value is 0.185 186What: /sys/fs/f2fs/<disk>/ram_thresh187Date: March 2014188Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>189Description: Controls the memory footprint used by free nids and cached190 nat entries. By default, 1 is set, which indicates191 10 MB / 1 GB RAM.192 193What: /sys/fs/f2fs/<disk>/cp_interval194Date: October 2015195Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>196Description: Controls the checkpoint timing, set to 60 seconds by default.197 198What: /sys/fs/f2fs/<disk>/idle_interval199Date: January 2016200Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>201Description: Controls the idle timing of system, if there is no FS operation202 during given interval.203 Set to 5 seconds by default.204 205What: /sys/fs/f2fs/<disk>/discard_idle_interval206Date: September 2018207Contact: "Chao Yu" <yuchao0@huawei.com>208Contact: "Sahitya Tummala" <quic_stummala@quicinc.com>209Description: Controls the idle timing of discard thread given210 this time interval.211 Default is 5 secs.212 213What: /sys/fs/f2fs/<disk>/gc_idle_interval214Date: September 2018215Contact: "Chao Yu" <yuchao0@huawei.com>216Contact: "Sahitya Tummala" <quic_stummala@quicinc.com>217Description: Controls the idle timing for gc path. Set to 5 seconds by default.218 219What: /sys/fs/f2fs/<disk>/iostat_enable220Date: August 2017221Contact: "Chao Yu" <yuchao0@huawei.com>222Description: Controls to enable/disable IO stat.223 224What: /sys/fs/f2fs/<disk>/ra_nid_pages225Date: October 2015226Contact: "Chao Yu" <chao2.yu@samsung.com>227Description: Controls the count of nid pages to be readaheaded.228 When building free nids, F2FS reads NAT blocks ahead for229 speed up. Default is 0.230 231What: /sys/fs/f2fs/<disk>/dirty_nats_ratio232Date: January 2016233Contact: "Chao Yu" <chao2.yu@samsung.com>234Description: Controls dirty nat entries ratio threshold, if current235 ratio exceeds configured threshold, checkpoint will236 be triggered for flushing dirty nat entries.237 238What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes239Date: January 2016240Contact: "Shuoran Liu" <liushuoran@huawei.com>241Description: Shows total written kbytes issued to disk.242 243What: /sys/fs/f2fs/<disk>/features244Date: July 2017245Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>246Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/>247 Shows all enabled features in current device.248 Supported features: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.252 253What: /sys/fs/f2fs/<disk>/feature_list/254Date: June 2021255Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>256Description: 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/.263 264What: /sys/fs/f2fs/features/265Date: July 2017266Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>267Description: Shows all enabled kernel features.268 Supported 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.274 275What: /sys/fs/f2fs/<disk>/inject_rate276Date: May 2016277Contact: "Sheng Yong" <shengyong1@huawei.com>278Description: Controls the injection rate of arbitrary faults.279 280What: /sys/fs/f2fs/<disk>/inject_type281Date: May 2016282Contact: "Sheng Yong" <shengyong1@huawei.com>283Description: Controls the injection type of arbitrary faults.284 285What: /sys/fs/f2fs/<disk>/dirty_segments286Date: October 2017287Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>288Description: Shows the number of dirty segments.289 290What: /sys/fs/f2fs/<disk>/reserved_blocks291Date: June 2017292Contact: "Chao Yu" <yuchao0@huawei.com>293Description: Controls target reserved blocks in system, the threshold294 is soft, it could exceed current available user space.295 296What: /sys/fs/f2fs/<disk>/current_reserved_blocks297Date: October 2017298Contact: "Yunlong Song" <yunlong.song@huawei.com>299Contact: "Chao Yu" <yuchao0@huawei.com>300Description: Shows current reserved blocks in system, it may be temporarily301 smaller than target_reserved_blocks, but will gradually302 increase to target_reserved_blocks when more free blocks are303 freed by user later.304 305What: /sys/fs/f2fs/<disk>/gc_urgent306Date: August 2017307Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>308Description: Do background GC aggressively when set. Set to 0 by default.309 gc urgent high(1): does GC forcibly in a period of given310 gc_urgent_sleep_time and ignores I/O idling check. uses greedy311 GC approach and turns SSR mode on.312 gc urgent low(2): lowers the bar of checking I/O idling in313 order to process outstanding discard commands and GC a314 little bit aggressively. uses cost benefit GC approach.315 gc urgent mid(3): does GC forcibly in a period of given316 gc_urgent_sleep_time and executes a mid level of I/O idling check.317 uses cost benefit GC approach.318 319What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time320Date: August 2017321Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>322Description: Controls sleep time of GC urgent mode. Set to 500ms by default.323 324What: /sys/fs/f2fs/<disk>/readdir_ra325Date: November 2017326Contact: "Sheng Yong" <shengyong1@huawei.com>327Description: Controls readahead inode block in readdir. Enabled by default.328 329What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh330Date: January 2018331Contact: Jaegeuk Kim <jaegeuk@kernel.org>332Description: This indicates how many GC can be failed for the pinned333 file. If it exceeds this, F2FS doesn't guarantee its pinning334 state. 2048 trials is set by default, and 65535 as maximum.335 336What: /sys/fs/f2fs/<disk>/extension_list337Date: February 2018338Contact: "Chao Yu" <yuchao0@huawei.com>339Description: Used to control configure extension list:340 - Query: cat /sys/fs/f2fs/<disk>/extension_list341 - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list342 - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list343 - [h] means add/del hot file extension344 - [c] means add/del cold file extension345 346What: /sys/fs/f2fs/<disk>/unusable347Date April 2019348Contact: "Daniel Rosenberg" <drosen@google.com>349Description: If checkpoint=disable, it displays the number of blocks that350 are unusable.351 If checkpoint=enable it displays the number of blocks that352 would be unusable if checkpoint=disable were to be set.353 354What: /sys/fs/f2fs/<disk>/encoding355Date July 2019356Contact: "Daniel Rosenberg" <drosen@google.com>357Description: Displays name and version of the encoding set for the filesystem.358 If no encoding is set, displays (none)359 360What: /sys/fs/f2fs/<disk>/free_segments361Date: September 2019362Contact: "Hridya Valsaraju" <hridya@google.com>363Description: Number of free segments in disk.364 365What: /sys/fs/f2fs/<disk>/cp_foreground_calls366Date: September 2019367Contact: "Hridya Valsaraju" <hridya@google.com>368Description: Number of checkpoint operations performed on demand. Available when369 CONFIG_F2FS_STAT_FS=y.370 371What: /sys/fs/f2fs/<disk>/cp_background_calls372Date: September 2019373Contact: "Hridya Valsaraju" <hridya@google.com>374Description: Number of checkpoint operations performed in the background to375 free segments. Available when CONFIG_F2FS_STAT_FS=y.376 377What: /sys/fs/f2fs/<disk>/gc_foreground_calls378Date: September 2019379Contact: "Hridya Valsaraju" <hridya@google.com>380Description: Number of garbage collection operations performed on demand.381 Available when CONFIG_F2FS_STAT_FS=y.382 383What: /sys/fs/f2fs/<disk>/gc_background_calls384Date: September 2019385Contact: "Hridya Valsaraju" <hridya@google.com>386Description: Number of garbage collection operations triggered in background.387 Available when CONFIG_F2FS_STAT_FS=y.388 389What: /sys/fs/f2fs/<disk>/moved_blocks_foreground390Date: September 2019391Contact: "Hridya Valsaraju" <hridya@google.com>392Description: Number of blocks moved by garbage collection in foreground.393 Available when CONFIG_F2FS_STAT_FS=y.394 395What: /sys/fs/f2fs/<disk>/moved_blocks_background396Date: September 2019397Contact: "Hridya Valsaraju" <hridya@google.com>398Description: Number of blocks moved by garbage collection in background.399 Available when CONFIG_F2FS_STAT_FS=y.400 401What: /sys/fs/f2fs/<disk>/avg_vblocks402Date: September 2019403Contact: "Hridya Valsaraju" <hridya@google.com>404Description: Average number of valid blocks.405 Available when CONFIG_F2FS_STAT_FS=y.406 407What: /sys/fs/f2fs/<disk>/mounted_time_sec408Date: February 2020409Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>410Description: Show the mounted time in secs of this partition.411 412What: /sys/fs/f2fs/<disk>/data_io_flag413Date: April 2020414Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>415Description: Give a way to attach REQ_META|FUA to data writes416 given temperature-based bits. Now the bits indicate:417 418 +-------------------+-------------------+419 | REQ_META | REQ_FUA |420 +------+------+-----+------+------+-----+421 | 5 | 4 | 3 | 2 | 1 | 0 |422 +------+------+-----+------+------+-----+423 | Cold | Warm | Hot | Cold | Warm | Hot |424 +------+------+-----+------+------+-----+425 426What: /sys/fs/f2fs/<disk>/node_io_flag427Date: June 2020428Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>429Description: Give a way to attach REQ_META|FUA to node writes430 given temperature-based bits. Now the bits indicate:431 432 +-------------------+-------------------+433 | REQ_META | REQ_FUA |434 +------+------+-----+------+------+-----+435 | 5 | 4 | 3 | 2 | 1 | 0 |436 +------+------+-----+------+------+-----+437 | Cold | Warm | Hot | Cold | Warm | Hot |438 +------+------+-----+------+------+-----+439 440What: /sys/fs/f2fs/<disk>/iostat_period_ms441Date: April 2020442Contact: "Daeho Jeong" <daehojeong@google.com>443Description: Give a way to change iostat_period time. 3secs by default.444 The new iostat trace gives stats gap given the period.445What: /sys/fs/f2fs/<disk>/max_io_bytes446Date: December 2020447Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>448Description: 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 a451 bio larger than that size.452 453What: /sys/fs/f2fs/<disk>/stat/sb_status454Date: December 2020455Contact: "Chao Yu" <yuchao0@huawei.com>456Description: Show status of f2fs superblock in real time.457 458 ====== ===================== =================================459 value sb status macro description460 0x1 SBI_IS_DIRTY dirty flag for checkpoint461 0x2 SBI_IS_CLOSE specify unmounting462 0x4 SBI_NEED_FSCK need fsck.f2fs to fix463 0x8 SBI_POR_DOING recovery is doing or not464 0x10 SBI_NEED_SB_WRITE need to recover superblock465 0x20 SBI_NEED_CP need to checkpoint466 0x40 SBI_IS_SHUTDOWN shutdown by ioctl467 0x80 SBI_IS_RECOVERED recovered orphan/data468 0x100 SBI_CP_DISABLED CP was disabled last mount469 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly470 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP471 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP472 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted473 0x2000 SBI_IS_RESIZEFS resizefs is in process474 0x4000 SBI_IS_FREEZING freefs is in process475 ====== ===================== =================================476 477What: /sys/fs/f2fs/<disk>/stat/cp_status478Date: September 2022479Contact: "Chao Yu" <chao.yu@oppo.com>480Description: Show status of f2fs checkpoint in real time.481 482 =============================== ==============================483 cp flag value484 CP_UMOUNT_FLAG 0x00000001485 CP_ORPHAN_PRESENT_FLAG 0x00000002486 CP_COMPACT_SUM_FLAG 0x00000004487 CP_ERROR_FLAG 0x00000008488 CP_FSCK_FLAG 0x00000010489 CP_FASTBOOT_FLAG 0x00000020490 CP_CRC_RECOVERY_FLAG 0x00000040491 CP_NAT_BITS_FLAG 0x00000080492 CP_TRIMMED_FLAG 0x00000100493 CP_NOCRC_RECOVERY_FLAG 0x00000200494 CP_LARGE_NAT_BITMAP_FLAG 0x00000400495 CP_QUOTA_NEED_FSCK_FLAG 0x00000800496 CP_DISABLED_FLAG 0x00001000497 CP_DISABLED_QUICK_FLAG 0x00002000498 CP_RESIZEFS_FLAG 0x00004000499 =============================== ==============================500 501What: /sys/fs/f2fs/<disk>/stat/issued_discard502Date: December 2023503Contact: "Zhiguo Niu" <zhiguo.niu@unisoc.com>504Description: Shows the number of issued discard.505 506What: /sys/fs/f2fs/<disk>/stat/queued_discard507Date: December 2023508Contact: "Zhiguo Niu" <zhiguo.niu@unisoc.com>509Description: Shows the number of queued discard.510 511What: /sys/fs/f2fs/<disk>/stat/undiscard_blks512Date: December 2023513Contact: "Zhiguo Niu" <zhiguo.niu@unisoc.com>514Description: Shows the total number of undiscard blocks.515 516What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio517Date: January 2021518Contact: "Daeho Jeong" <daehojeong@google.com>519Description: Give a way to change checkpoint merge daemon's io priority.520 Its default value is "be,3", which means "BE" I/O class and521 I/O priority "3". We can select the class between "rt" and "be",522 and set the I/O priority within valid range of it. "," delimiter523 is necessary in between I/O class and priority number.524 525What: /sys/fs/f2fs/<disk>/ovp_segments526Date: March 2021527Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>528Description: Shows the number of overprovision segments.529 530What: /sys/fs/f2fs/<disk>/compr_written_block531Date: March 2021532Contact: "Daeho Jeong" <daehojeong@google.com>533Description: Show the block count written after compression since mount. Note534 that when the compressed blocks are deleted, this count doesn't535 decrease. If you write "0" here, you can initialize536 compr_written_block and compr_saved_block to "0".537 538What: /sys/fs/f2fs/<disk>/compr_saved_block539Date: March 2021540Contact: "Daeho Jeong" <daehojeong@google.com>541Description: Show the saved block count with compression since mount. Note542 that when the compressed blocks are deleted, this count doesn't543 decrease. If you write "0" here, you can initialize544 compr_written_block and compr_saved_block to "0".545 546What: /sys/fs/f2fs/<disk>/compr_new_inode547Date: March 2021548Contact: "Daeho Jeong" <daehojeong@google.com>549Description: Show the count of inode newly enabled for compression since mount.550 Note that when the compression is disabled for the files, this count551 doesn't decrease. If you write "0" here, you can initialize552 compr_new_inode to "0".553 554What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio555Date: May 2021556Contact: "Chao Yu" <yuchao0@huawei.com>557Description: When ATGC is on, it controls candidate ratio in order to limit total558 number of potential victim in all candidates, the value should be in559 range of [0, 100], by default it was initialized as 20(%).560 561What: /sys/fs/f2fs/<disk>/atgc_candidate_count562Date: May 2021563Contact: "Chao Yu" <yuchao0@huawei.com>564Description: When ATGC is on, it controls candidate count in order to limit total565 number of potential victim in all candidates, by default it was566 initialized as 10 (sections).567 568What: /sys/fs/f2fs/<disk>/atgc_age_weight569Date: May 2021570Contact: "Chao Yu" <yuchao0@huawei.com>571Description: When ATGC is on, it controls age weight to balance weight proportion572 in between aging and valid blocks, the value should be in range of573 [0, 100], by default it was initialized as 60(%).574 575What: /sys/fs/f2fs/<disk>/atgc_age_threshold576Date: May 2021577Contact: "Chao Yu" <yuchao0@huawei.com>578Description: When ATGC is on, it controls age threshold to bypass GCing young579 candidates whose age is not beyond the threshold, by default it was580 initialized as 604800 seconds (equals to 7 days).581 582What: /sys/fs/f2fs/<disk>/atgc_enabled583Date: Feb 2024584Contact: "Jinbao Liu" <liujinbao1@xiaomi.com>585Description: It represents whether ATGC is on or off. The value is 1 which586 indicates that ATGC is on, and 0 indicates that it is off.587 588What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments589Date: July 2021590Contact: "Daeho Jeong" <daehojeong@google.com>591Description: Show how many segments have been reclaimed by GC during a specific592 GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy,593 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid)594 You can re-initialize this value to "0".595 596What: /sys/fs/f2fs/<disk>/gc_segment_mode597Date: July 2021598Contact: "Daeho Jeong" <daehojeong@google.com>599Description: You can control for which gc mode the "gc_reclaimed_segments" node shows.600 Refer to the description of the modes in "gc_reclaimed_segments".601 602What: /sys/fs/f2fs/<disk>/seq_file_ra_mul603Date: July 2021604Contact: "Daeho Jeong" <daehojeong@google.com>605Description: You can control the multiplier value of bdi device readahead window size606 between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option.607 608What: /sys/fs/f2fs/<disk>/max_fragment_chunk609Date: August 2021610Contact: "Daeho Jeong" <daehojeong@google.com>611Description: With "mode=fragment:block" mount options, we can scatter block allocation.612 f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole613 in the length of 1..<max_fragment_hole> by turns. This value can be set614 between 1..512 and the default value is 4.615 616What: /sys/fs/f2fs/<disk>/max_fragment_hole617Date: August 2021618Contact: "Daeho Jeong" <daehojeong@google.com>619Description: With "mode=fragment:block" mount options, we can scatter block allocation.620 f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole621 in the length of 1..<max_fragment_hole> by turns. This value can be set622 between 1..512 and the default value is 4.623 624What: /sys/fs/f2fs/<disk>/gc_remaining_trials625Date: October 2022626Contact: "Yangtao Li" <frank.li@vivo.com>627Description: You can set the trial count limit for GC urgent and idle mode with this value.628 If GC thread gets to the limit, the mode will turn back to GC normal mode.629 By default, the value is zero, which means there is no limit like before.630 631What: /sys/fs/f2fs/<disk>/max_roll_forward_node_blocks632Date: January 2022633Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>634Description: Controls max # of node block writes to be used for roll forward635 recovery. This can limit the roll forward recovery time.636 637What: /sys/fs/f2fs/<disk>/unusable_blocks_per_sec638Date: June 2022639Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>640Description: Shows the number of unusable blocks in a section which was defined by641 the zone capacity reported by underlying zoned device.642 643What: /sys/fs/f2fs/<disk>/current_atomic_write644Date: July 2022645Contact: "Daeho Jeong" <daehojeong@google.com>646Description: Show the total current atomic write block count, which is not committed yet.647 This is a read-only entry.648 649What: /sys/fs/f2fs/<disk>/peak_atomic_write650Date: July 2022651Contact: "Daeho Jeong" <daehojeong@google.com>652Description: Show the peak value of total current atomic write block count after boot.653 If you write "0" here, you can initialize to "0".654 655What: /sys/fs/f2fs/<disk>/committed_atomic_block656Date: July 2022657Contact: "Daeho Jeong" <daehojeong@google.com>658Description: Show the accumulated total committed atomic write block count after boot.659 If you write "0" here, you can initialize to "0".660 661What: /sys/fs/f2fs/<disk>/revoked_atomic_block662Date: July 2022663Contact: "Daeho Jeong" <daehojeong@google.com>664Description: Show the accumulated total revoked atomic write block count after boot.665 If you write "0" here, you can initialize to "0".666 667What: /sys/fs/f2fs/<disk>/gc_mode668Date: October 2022669Contact: "Yangtao Li" <frank.li@vivo.com>670Description: Show the current gc_mode as a string.671 This is a read-only entry.672 673What: /sys/fs/f2fs/<disk>/discard_urgent_util674Date: November 2022675Contact: "Yangtao Li" <frank.li@vivo.com>676Description: When space utilization exceeds this, do background DISCARD aggressively.677 Does DISCARD forcibly in a period of given min_discard_issue_time when the number678 of discards is not 0 and set discard granularity to 1.679 Default: 80680 681What: /sys/fs/f2fs/<disk>/hot_data_age_threshold682Date: November 2022683Contact: "Ping Xiong" <xiongping1@xiaomi.com>684Description: When DATA SEPARATION is on, it controls the age threshold to indicate685 the data blocks as hot. By default it was initialized as 262144 blocks686 (equals to 1GB).687 688What: /sys/fs/f2fs/<disk>/warm_data_age_threshold689Date: November 2022690Contact: "Ping Xiong" <xiongping1@xiaomi.com>691Description: When DATA SEPARATION is on, it controls the age threshold to indicate692 the data blocks as warm. By default it was initialized as 2621440 blocks693 (equals to 10GB).694 695What: /sys/fs/f2fs/<disk>/fault_rate696Date: May 2016697Contact: "Sheng Yong" <shengyong@oppo.com>698Contact: "Chao Yu" <chao@kernel.org>699Description: Enable fault injection in all supported types with700 specified injection rate.701 702What: /sys/fs/f2fs/<disk>/fault_type703Date: May 2016704Contact: "Sheng Yong" <shengyong@oppo.com>705Contact: "Chao Yu" <chao@kernel.org>706Description: Support configuring fault injection type, should be707 enabled with fault_injection option, fault type value708 is shown below, it supports single or combined type.709 710 =========================== ===========711 Type_Name Type_Value712 =========================== ===========713 FAULT_KMALLOC 0x000000001714 FAULT_KVMALLOC 0x000000002715 FAULT_PAGE_ALLOC 0x000000004716 FAULT_PAGE_GET 0x000000008717 FAULT_ALLOC_BIO 0x000000010 (obsolete)718 FAULT_ALLOC_NID 0x000000020719 FAULT_ORPHAN 0x000000040720 FAULT_BLOCK 0x000000080721 FAULT_DIR_DEPTH 0x000000100722 FAULT_EVICT_INODE 0x000000200723 FAULT_TRUNCATE 0x000000400724 FAULT_READ_IO 0x000000800725 FAULT_CHECKPOINT 0x000001000726 FAULT_DISCARD 0x000002000727 FAULT_WRITE_IO 0x000004000728 FAULT_SLAB_ALLOC 0x000008000729 FAULT_DQUOT_INIT 0x000010000730 FAULT_LOCK_OP 0x000020000731 FAULT_BLKADDR_VALIDITY 0x000040000732 FAULT_BLKADDR_CONSISTENCE 0x000080000733 FAULT_NO_SEGMENT 0x000100000734 =========================== ===========735 736What: /sys/fs/f2fs/<disk>/discard_io_aware_gran737Date: January 2023738Contact: "Yangtao Li" <frank.li@vivo.com>739Description: Controls background discard granularity of inner discard thread740 when is not in idle. Inner thread will not issue discards with size that741 is smaller than granularity. The unit size is one block(4KB), now only742 support configuring in range of [0, 512].743 Default: 512744 745What: /sys/fs/f2fs/<disk>/last_age_weight746Date: January 2023747Contact: "Ping Xiong" <xiongping1@xiaomi.com>748Description: When DATA SEPARATION is on, it controls the weight of last data block age.749 750What: /sys/fs/f2fs/<disk>/compress_watermark751Date: February 2023752Contact: "Yangtao Li" <frank.li@vivo.com>753Description: When compress cache is on, it controls free memory watermark754 in order to limit caching compress page. If free memory is lower755 than watermark, then deny caching compress page. The value should be in756 range of (0, 100], by default it was initialized as 20(%).757 758What: /sys/fs/f2fs/<disk>/compress_percent759Date: February 2023760Contact: "Yangtao Li" <frank.li@vivo.com>761Description: When compress cache is on, it controls cached page762 percent(compress pages / free_ram) in order to limit caching compress page.763 If cached page percent exceed threshold, then deny caching compress page.764 The value should be in range of (0, 100], by default it was initialized765 as 20(%).766 767What: /sys/fs/f2fs/<disk>/discard_io_aware768Date: November 2023769Contact: "Chao Yu" <chao@kernel.org>770Description: It controls to enable/disable IO aware feature for background discard.771 By default, the value is 1 which indicates IO aware is on.772 773What: /sys/fs/f2fs/<disk>/blkzone_alloc_policy774Date: July 2024775Contact: "Yuanhong Liao" <liaoyuanhong@vivo.com>776Description: The zone UFS we are currently using consists of two parts:777 conventional zones and sequential zones. It can be used to control which part778 to prioritize for writes, with a default value of 0.779 780 ======================== =========================================781 value description782 blkzone_alloc_policy = 0 Prioritize writing to sequential zones783 blkzone_alloc_policy = 1 Only allow writing to sequential zones784 blkzone_alloc_policy = 2 Prioritize writing to conventional zones785 ======================== =========================================786 787What: /sys/fs/f2fs/<disk>/migration_window_granularity788Date: September 2024789Contact: "Daeho Jeong" <daehojeong@google.com>790Description: Controls migration window granularity of garbage collection on large791 section. it can control the scanning window granularity for GC migration792 in a unit of segment, while migration_granularity controls the number793 of segments which can be migrated at the same turn.794 795What: /sys/fs/f2fs/<disk>/reserved_segments796Date: September 2024797Contact: "Daeho Jeong" <daehojeong@google.com>798Description: In order to fine tune GC behavior, we can control the number of799 reserved segments.800 801What: /sys/fs/f2fs/<disk>/gc_no_zoned_gc_percent802Date: September 2024803Contact: "Daeho Jeong" <daehojeong@google.com>804Description: If the percentage of free sections over total sections is above this805 number, F2FS do not garbage collection for zoned devices through the806 background GC thread. the default number is "60".807 808What: /sys/fs/f2fs/<disk>/gc_boost_zoned_gc_percent809Date: September 2024810Contact: "Daeho Jeong" <daehojeong@google.com>811Description: If the percentage of free sections over total sections is under this812 number, F2FS boosts garbage collection for zoned devices through the813 background GC thread. the default number is "25".814 815What: /sys/fs/f2fs/<disk>/gc_valid_thresh_ratio816Date: September 2024817Contact: "Daeho Jeong" <daehojeong@google.com>818Description: It controls the valid block ratio threshold not to trigger excessive GC819 for zoned deivces. The initial value of it is 95(%). F2FS will stop the820 background GC thread from intiating GC for sections having valid blocks821 exceeding the ratio.822