1What: /sys/fs/f2fs/<disk>/gc_max_sleep_time 2Date: July 2013 3Contact: "Namjae Jeon" <namjae.jeon@samsung.com> 4Description: Controls the maximum sleep time for gc_thread. Time 5 is in milliseconds. 6 7What: /sys/fs/f2fs/<disk>/gc_min_sleep_time 8Date: July 2013 9Contact: "Namjae Jeon" <namjae.jeon@samsung.com> 10Description: Controls the minimum sleep time for gc_thread. Time 11 is in milliseconds. 12 13What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time 14Date: July 2013 15Contact: "Namjae Jeon" <namjae.jeon@samsung.com> 16Description: Controls the default sleep time for gc_thread. Time 17 is in milliseconds. 18 19What: /sys/fs/f2fs/<disk>/gc_idle 20Date: July 2013 21Contact: "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 & setting 27 gc_idle = 2 will select the greedy approach & setting 28 gc_idle = 3 will select the age-threshold based approach. 29 =========== =============================================== 30 31What: /sys/fs/f2fs/<disk>/reclaim_segments 32Date: October 2013 33Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 34Description: 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. 40 41What: /sys/fs/f2fs/<disk>/main_blkaddr 42Date: November 2019 43Contact: "Ramon Pantin" <pantin@google.com> 44Description: Shows first block address of MAIN area. 45 46What: /sys/fs/f2fs/<disk>/ipu_policy 47Date: November 2013 48Contact: "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 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 threashold 58 0x08 SSR_UTIL if SSR mode is activated and FS utilization is over 59 threashold 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. 63 (=default option) 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 67 FI_OPU_WRITE flag 68 ===== =============== =================================================== 69 70 Refer segment.h for details. 71 72What: /sys/fs/f2fs/<disk>/min_ipu_util 73Date: November 2013 74Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 75Description: 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. 77 78What: /sys/fs/f2fs/<disk>/min_fsync_blocks 79Date: September 2014 80Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 81Description: Controls the dirty page count condition for the in-place-update 82 policies. 83 84What: /sys/fs/f2fs/<disk>/min_seq_blocks 85Date: August 2018 86Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 87Description: Controls the dirty page count condition for batched sequential 88 writes in writepages. 89 90What: /sys/fs/f2fs/<disk>/min_hot_blocks 91Date: March 2017 92Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 93Description: Controls the dirty page count condition for redefining hot data. 94 95What: /sys/fs/f2fs/<disk>/min_ssr_sections 96Date: October 2017 97Contact: "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_discards 102Date: November 2013 103Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 104Description: Controls the issue rate of discard commands that consist of small 105 blocks less than 2MB. The candidates to be discarded are cached until 106 checkpoint is triggered, and issued during the checkpoint. 107 By default, it is disabled with 0. 108 109What: /sys/fs/f2fs/<disk>/max_ordered_discard 110Date: October 2022 111Contact: "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_request 116Date: December 2021 117Contact: "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 work 120 faster, at the cost of higher latency for incomming I/O. 121 122What: /sys/fs/f2fs/<disk>/min_discard_issue_time 123Date: December 2021 124Contact: "Konstantin Vyshetsky" <vkon@google.com> 125Description: 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. 128 129What: /sys/fs/f2fs/<disk>/mid_discard_issue_time 130Date: December 2021 131Contact: "Konstantin Vyshetsky" <vkon@google.com> 132Description: 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. 135 136What: /sys/fs/f2fs/<disk>/max_discard_issue_time 137Date: December 2021 138Contact: "Konstantin Vyshetsky" <vkon@google.com> 139Description: Controls the interval the discard thread will wait when there are 140 no discard operations to be issued. 141 142What: /sys/fs/f2fs/<disk>/discard_granularity 143Date: July 2017 144Contact: "Chao Yu" <yuchao0@huawei.com> 145Description: 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. 150 151What: /sys/fs/f2fs/<disk>/umount_discard_timeout 152Date: January 2019 153Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 154Description: Set timeout to issue discard commands during umount. 155 Default: 5 secs 156 157What: /sys/fs/f2fs/<disk>/pending_discard 158Date: November 2021 159Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 160Description: Shows the number of pending discard commands in the queue. 161 162What: /sys/fs/f2fs/<disk>/max_victim_search 163Date: January 2014 164Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 165Description: 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. 168 169What: /sys/fs/f2fs/<disk>/migration_granularity 170Date: October 2018 171Contact: "Chao Yu" <yuchao0@huawei.com> 172Description: 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. 176 177What: /sys/fs/f2fs/<disk>/dir_level 178Date: March 2014 179Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 180Description: 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. 185 186What: /sys/fs/f2fs/<disk>/ram_thresh 187Date: March 2014 188Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 189Description: Controls the memory footprint used by free nids and cached 190 nat entries. By default, 1 is set, which indicates 191 10 MB / 1 GB RAM. 192 193What: /sys/fs/f2fs/<disk>/batched_trim_sections 194Date: February 2015 195Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 196Description: Controls the trimming rate in batch mode. 197 <deprecated> 198 199What: /sys/fs/f2fs/<disk>/cp_interval 200Date: October 2015 201Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 202Description: Controls the checkpoint timing, set to 60 seconds by default. 203 204What: /sys/fs/f2fs/<disk>/idle_interval 205Date: January 2016 206Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 207Description: Controls the idle timing of system, if there is no FS operation 208 during given interval. 209 Set to 5 seconds by default. 210 211What: /sys/fs/f2fs/<disk>/discard_idle_interval 212Date: September 2018 213Contact: "Chao Yu" <yuchao0@huawei.com> 214Contact: "Sahitya Tummala" <stummala@codeaurora.org> 215Description: Controls the idle timing of discard thread given 216 this time interval. 217 Default is 5 secs. 218 219What: /sys/fs/f2fs/<disk>/gc_idle_interval 220Date: September 2018 221Contact: "Chao Yu" <yuchao0@huawei.com> 222Contact: "Sahitya Tummala" <stummala@codeaurora.org> 223Description: Controls the idle timing for gc path. Set to 5 seconds by default. 224 225What: /sys/fs/f2fs/<disk>/iostat_enable 226Date: August 2017 227Contact: "Chao Yu" <yuchao0@huawei.com> 228Description: Controls to enable/disable IO stat. 229 230What: /sys/fs/f2fs/<disk>/ra_nid_pages 231Date: October 2015 232Contact: "Chao Yu" <chao2.yu@samsung.com> 233Description: Controls the count of nid pages to be readaheaded. 234 When building free nids, F2FS reads NAT blocks ahead for 235 speed up. Default is 0. 236 237What: /sys/fs/f2fs/<disk>/dirty_nats_ratio 238Date: January 2016 239Contact: "Chao Yu" <chao2.yu@samsung.com> 240Description: Controls dirty nat entries ratio threshold, if current 241 ratio exceeds configured threshold, checkpoint will 242 be triggered for flushing dirty nat entries. 243 244What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes 245Date: January 2016 246Contact: "Shuoran Liu" <liushuoran@huawei.com> 247Description: Shows total written kbytes issued to disk. 248 249What: /sys/fs/f2fs/<disk>/features 250Date: July 2017 251Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 252Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/> 253 Shows all enabled features in current device. 254 Supported features: 255 encryption, blkzoned, extra_attr, projquota, inode_checksum, 256 flexible_inline_xattr, quota_ino, inode_crtime, lost_found, 257 verity, sb_checksum, casefold, readonly, compression, pin_file. 258 259What: /sys/fs/f2fs/<disk>/feature_list/ 260Date: June 2021 261Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 262Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule. 263 Supported on-disk features: 264 encryption, block_zoned (aka blkzoned), extra_attr, 265 project_quota (aka projquota), inode_checksum, 266 flexible_inline_xattr, quota_ino, inode_crtime, lost_found, 267 verity, sb_checksum, casefold, readonly, compression. 268 Note that, pin_file is moved into /sys/fs/f2fs/features/. 269 270What: /sys/fs/f2fs/features/ 271Date: July 2017 272Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 273Description: Shows all enabled kernel features. 274 Supported features: 275 encryption, block_zoned, extra_attr, project_quota, 276 inode_checksum, flexible_inline_xattr, quota_ino, 277 inode_crtime, lost_found, verity, sb_checksum, 278 casefold, readonly, compression, test_dummy_encryption_v2, 279 atomic_write, pin_file, encrypted_casefold. 280 281What: /sys/fs/f2fs/<disk>/inject_rate 282Date: May 2016 283Contact: "Sheng Yong" <shengyong1@huawei.com> 284Description: Controls the injection rate of arbitrary faults. 285 286What: /sys/fs/f2fs/<disk>/inject_type 287Date: May 2016 288Contact: "Sheng Yong" <shengyong1@huawei.com> 289Description: Controls the injection type of arbitrary faults. 290 291What: /sys/fs/f2fs/<disk>/dirty_segments 292Date: October 2017 293Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 294Description: Shows the number of dirty segments. 295 296What: /sys/fs/f2fs/<disk>/reserved_blocks 297Date: June 2017 298Contact: "Chao Yu" <yuchao0@huawei.com> 299Description: Controls target reserved blocks in system, the threshold 300 is soft, it could exceed current available user space. 301 302What: /sys/fs/f2fs/<disk>/current_reserved_blocks 303Date: October 2017 304Contact: "Yunlong Song" <yunlong.song@huawei.com> 305Contact: "Chao Yu" <yuchao0@huawei.com> 306Description: Shows current reserved blocks in system, it may be temporarily 307 smaller than target_reserved_blocks, but will gradually 308 increase to target_reserved_blocks when more free blocks are 309 freed by user later. 310 311What: /sys/fs/f2fs/<disk>/gc_urgent 312Date: August 2017 313Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 314Description: Do background GC aggressively when set. Set to 0 by default. 315 gc urgent high(1): does GC forcibly in a period of given 316 gc_urgent_sleep_time and ignores I/O idling check. uses greedy 317 GC approach and turns SSR mode on. 318 gc urgent low(2): lowers the bar of checking I/O idling in 319 order to process outstanding discard commands and GC a 320 little bit aggressively. uses cost benefit GC approach. 321 gc urgent mid(3): does GC forcibly in a period of given 322 gc_urgent_sleep_time and executes a mid level of I/O idling check. 323 uses cost benefit GC approach. 324 325What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time 326Date: August 2017 327Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 328Description: Controls sleep time of GC urgent mode. Set to 500ms by default. 329 330What: /sys/fs/f2fs/<disk>/readdir_ra 331Date: November 2017 332Contact: "Sheng Yong" <shengyong1@huawei.com> 333Description: Controls readahead inode block in readdir. Enabled by default. 334 335What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh 336Date: January 2018 337Contact: Jaegeuk Kim <jaegeuk@kernel.org> 338Description: This indicates how many GC can be failed for the pinned 339 file. If it exceeds this, F2FS doesn't guarantee its pinning 340 state. 2048 trials is set by default. 341 342What: /sys/fs/f2fs/<disk>/extension_list 343Date: Feburary 2018 344Contact: "Chao Yu" <yuchao0@huawei.com> 345Description: Used to control configure extension list: 346 - Query: cat /sys/fs/f2fs/<disk>/extension_list 347 - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list 348 - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list 349 - [h] means add/del hot file extension 350 - [c] means add/del cold file extension 351 352What: /sys/fs/f2fs/<disk>/unusable 353Date April 2019 354Contact: "Daniel Rosenberg" <drosen@google.com> 355Description: If checkpoint=disable, it displays the number of blocks that 356 are unusable. 357 If checkpoint=enable it displays the number of blocks that 358 would be unusable if checkpoint=disable were to be set. 359 360What: /sys/fs/f2fs/<disk>/encoding 361Date July 2019 362Contact: "Daniel Rosenberg" <drosen@google.com> 363Description: Displays name and version of the encoding set for the filesystem. 364 If no encoding is set, displays (none) 365 366What: /sys/fs/f2fs/<disk>/free_segments 367Date: September 2019 368Contact: "Hridya Valsaraju" <hridya@google.com> 369Description: Number of free segments in disk. 370 371What: /sys/fs/f2fs/<disk>/cp_foreground_calls 372Date: September 2019 373Contact: "Hridya Valsaraju" <hridya@google.com> 374Description: Number of checkpoint operations performed on demand. Available when 375 CONFIG_F2FS_STAT_FS=y. 376 377What: /sys/fs/f2fs/<disk>/cp_background_calls 378Date: September 2019 379Contact: "Hridya Valsaraju" <hridya@google.com> 380Description: Number of checkpoint operations performed in the background to 381 free segments. Available when CONFIG_F2FS_STAT_FS=y. 382 383What: /sys/fs/f2fs/<disk>/gc_foreground_calls 384Date: September 2019 385Contact: "Hridya Valsaraju" <hridya@google.com> 386Description: Number of garbage collection operations performed on demand. 387 Available when CONFIG_F2FS_STAT_FS=y. 388 389What: /sys/fs/f2fs/<disk>/gc_background_calls 390Date: September 2019 391Contact: "Hridya Valsaraju" <hridya@google.com> 392Description: Number of garbage collection operations triggered in background. 393 Available when CONFIG_F2FS_STAT_FS=y. 394 395What: /sys/fs/f2fs/<disk>/moved_blocks_foreground 396Date: September 2019 397Contact: "Hridya Valsaraju" <hridya@google.com> 398Description: Number of blocks moved by garbage collection in foreground. 399 Available when CONFIG_F2FS_STAT_FS=y. 400 401What: /sys/fs/f2fs/<disk>/moved_blocks_background 402Date: September 2019 403Contact: "Hridya Valsaraju" <hridya@google.com> 404Description: Number of blocks moved by garbage collection in background. 405 Available when CONFIG_F2FS_STAT_FS=y. 406 407What: /sys/fs/f2fs/<disk>/avg_vblocks 408Date: September 2019 409Contact: "Hridya Valsaraju" <hridya@google.com> 410Description: Average number of valid blocks. 411 Available when CONFIG_F2FS_STAT_FS=y. 412 413What: /sys/fs/f2fs/<disk>/mounted_time_sec 414Date: February 2020 415Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 416Description: Show the mounted time in secs of this partition. 417 418What: /sys/fs/f2fs/<disk>/data_io_flag 419Date: April 2020 420Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 421Description: Give a way to attach REQ_META|FUA to data writes 422 given temperature-based bits. Now the bits indicate: 423 424 +-------------------+-------------------+ 425 | REQ_META | REQ_FUA | 426 +------+------+-----+------+------+-----+ 427 | 5 | 4 | 3 | 2 | 1 | 0 | 428 +------+------+-----+------+------+-----+ 429 | Cold | Warm | Hot | Cold | Warm | Hot | 430 +------+------+-----+------+------+-----+ 431 432What: /sys/fs/f2fs/<disk>/node_io_flag 433Date: June 2020 434Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 435Description: Give a way to attach REQ_META|FUA to node writes 436 given temperature-based bits. Now the bits indicate: 437 438 +-------------------+-------------------+ 439 | REQ_META | REQ_FUA | 440 +------+------+-----+------+------+-----+ 441 | 5 | 4 | 3 | 2 | 1 | 0 | 442 +------+------+-----+------+------+-----+ 443 | Cold | Warm | Hot | Cold | Warm | Hot | 444 +------+------+-----+------+------+-----+ 445 446What: /sys/fs/f2fs/<disk>/iostat_period_ms 447Date: April 2020 448Contact: "Daeho Jeong" <daehojeong@google.com> 449Description: Give a way to change iostat_period time. 3secs by default. 450 The new iostat trace gives stats gap given the period. 451What: /sys/fs/f2fs/<disk>/max_io_bytes 452Date: December 2020 453Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 454Description: This gives a control to limit the bio size in f2fs. 455 Default is zero, which will follow underlying block layer limit, 456 whereas, if it has a certain bytes value, f2fs won't submit a 457 bio larger than that size. 458 459What: /sys/fs/f2fs/<disk>/stat/sb_status 460Date: December 2020 461Contact: "Chao Yu" <yuchao0@huawei.com> 462Description: Show status of f2fs superblock in real time. 463 464 ====== ===================== ================================= 465 value sb status macro description 466 0x1 SBI_IS_DIRTY dirty flag for checkpoint 467 0x2 SBI_IS_CLOSE specify unmounting 468 0x4 SBI_NEED_FSCK need fsck.f2fs to fix 469 0x8 SBI_POR_DOING recovery is doing or not 470 0x10 SBI_NEED_SB_WRITE need to recover superblock 471 0x20 SBI_NEED_CP need to checkpoint 472 0x40 SBI_IS_SHUTDOWN shutdown by ioctl 473 0x80 SBI_IS_RECOVERED recovered orphan/data 474 0x100 SBI_CP_DISABLED CP was disabled last mount 475 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly 476 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP 477 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP 478 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted 479 0x2000 SBI_IS_RESIZEFS resizefs is in process 480 0x4000 SBI_IS_FREEZING freefs is in process 481 ====== ===================== ================================= 482 483What: /sys/fs/f2fs/<disk>/stat/cp_status 484Date: September 2022 485Contact: "Chao Yu" <chao.yu@oppo.com> 486Description: Show status of f2fs checkpoint in real time. 487 488 =============================== ============================== 489 cp flag value 490 CP_UMOUNT_FLAG 0x00000001 491 CP_ORPHAN_PRESENT_FLAG 0x00000002 492 CP_COMPACT_SUM_FLAG 0x00000004 493 CP_ERROR_FLAG 0x00000008 494 CP_FSCK_FLAG 0x00000010 495 CP_FASTBOOT_FLAG 0x00000020 496 CP_CRC_RECOVERY_FLAG 0x00000040 497 CP_NAT_BITS_FLAG 0x00000080 498 CP_TRIMMED_FLAG 0x00000100 499 CP_NOCRC_RECOVERY_FLAG 0x00000200 500 CP_LARGE_NAT_BITMAP_FLAG 0x00000400 501 CP_QUOTA_NEED_FSCK_FLAG 0x00000800 502 CP_DISABLED_FLAG 0x00001000 503 CP_DISABLED_QUICK_FLAG 0x00002000 504 CP_RESIZEFS_FLAG 0x00004000 505 =============================== ============================== 506 507What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio 508Date: January 2021 509Contact: "Daeho Jeong" <daehojeong@google.com> 510Description: Give a way to change checkpoint merge daemon's io priority. 511 Its default value is "be,3", which means "BE" I/O class and 512 I/O priority "3". We can select the class between "rt" and "be", 513 and set the I/O priority within valid range of it. "," delimiter 514 is necessary in between I/O class and priority number. 515 516What: /sys/fs/f2fs/<disk>/ovp_segments 517Date: March 2021 518Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 519Description: Shows the number of overprovision segments. 520 521What: /sys/fs/f2fs/<disk>/compr_written_block 522Date: March 2021 523Contact: "Daeho Jeong" <daehojeong@google.com> 524Description: Show the block count written after compression since mount. Note 525 that when the compressed blocks are deleted, this count doesn't 526 decrease. If you write "0" here, you can initialize 527 compr_written_block and compr_saved_block to "0". 528 529What: /sys/fs/f2fs/<disk>/compr_saved_block 530Date: March 2021 531Contact: "Daeho Jeong" <daehojeong@google.com> 532Description: Show the saved block count with compression since mount. Note 533 that when the compressed blocks are deleted, this count doesn't 534 decrease. If you write "0" here, you can initialize 535 compr_written_block and compr_saved_block to "0". 536 537What: /sys/fs/f2fs/<disk>/compr_new_inode 538Date: March 2021 539Contact: "Daeho Jeong" <daehojeong@google.com> 540Description: Show the count of inode newly enabled for compression since mount. 541 Note that when the compression is disabled for the files, this count 542 doesn't decrease. If you write "0" here, you can initialize 543 compr_new_inode to "0". 544 545What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio 546Date: May 2021 547Contact: "Chao Yu" <yuchao0@huawei.com> 548Description: When ATGC is on, it controls candidate ratio in order to limit total 549 number of potential victim in all candidates, the value should be in 550 range of [0, 100], by default it was initialized as 20(%). 551 552What: /sys/fs/f2fs/<disk>/atgc_candidate_count 553Date: May 2021 554Contact: "Chao Yu" <yuchao0@huawei.com> 555Description: When ATGC is on, it controls candidate count in order to limit total 556 number of potential victim in all candidates, by default it was 557 initialized as 10 (sections). 558 559What: /sys/fs/f2fs/<disk>/atgc_age_weight 560Date: May 2021 561Contact: "Chao Yu" <yuchao0@huawei.com> 562Description: When ATGC is on, it controls age weight to balance weight proportion 563 in between aging and valid blocks, the value should be in range of 564 [0, 100], by default it was initialized as 60(%). 565 566What: /sys/fs/f2fs/<disk>/atgc_age_threshold 567Date: May 2021 568Contact: "Chao Yu" <yuchao0@huawei.com> 569Description: When ATGC is on, it controls age threshold to bypass GCing young 570 candidates whose age is not beyond the threshold, by default it was 571 initialized as 604800 seconds (equals to 7 days). 572 573What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments 574Date: July 2021 575Contact: "Daeho Jeong" <daehojeong@google.com> 576Description: Show how many segments have been reclaimed by GC during a specific 577 GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy, 578 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid) 579 You can re-initialize this value to "0". 580 581What: /sys/fs/f2fs/<disk>/gc_segment_mode 582Date: July 2021 583Contact: "Daeho Jeong" <daehojeong@google.com> 584Description: You can control for which gc mode the "gc_reclaimed_segments" node shows. 585 Refer to the description of the modes in "gc_reclaimed_segments". 586 587What: /sys/fs/f2fs/<disk>/seq_file_ra_mul 588Date: July 2021 589Contact: "Daeho Jeong" <daehojeong@google.com> 590Description: You can control the multiplier value of bdi device readahead window size 591 between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option. 592 593What: /sys/fs/f2fs/<disk>/max_fragment_chunk 594Date: August 2021 595Contact: "Daeho Jeong" <daehojeong@google.com> 596Description: With "mode=fragment:block" mount options, we can scatter block allocation. 597 f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole 598 in the length of 1..<max_fragment_hole> by turns. This value can be set 599 between 1..512 and the default value is 4. 600 601What: /sys/fs/f2fs/<disk>/max_fragment_hole 602Date: August 2021 603Contact: "Daeho Jeong" <daehojeong@google.com> 604Description: With "mode=fragment:block" mount options, we can scatter block allocation. 605 f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole 606 in the length of 1..<max_fragment_hole> by turns. This value can be set 607 between 1..512 and the default value is 4. 608 609What: /sys/fs/f2fs/<disk>/gc_remaining_trials 610Date: October 2022 611Contact: "Yangtao Li" <frank.li@vivo.com> 612Description: You can set the trial count limit for GC urgent and idle mode with this value. 613 If GC thread gets to the limit, the mode will turn back to GC normal mode. 614 By default, the value is zero, which means there is no limit like before. 615 616What: /sys/fs/f2fs/<disk>/max_roll_forward_node_blocks 617Date: January 2022 618Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 619Description: Controls max # of node block writes to be used for roll forward 620 recovery. This can limit the roll forward recovery time. 621 622What: /sys/fs/f2fs/<disk>/unusable_blocks_per_sec 623Date: June 2022 624Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 625Description: Shows the number of unusable blocks in a section which was defined by 626 the zone capacity reported by underlying zoned device. 627 628What: /sys/fs/f2fs/<disk>/current_atomic_write 629Date: July 2022 630Contact: "Daeho Jeong" <daehojeong@google.com> 631Description: Show the total current atomic write block count, which is not committed yet. 632 This is a read-only entry. 633 634What: /sys/fs/f2fs/<disk>/peak_atomic_write 635Date: July 2022 636Contact: "Daeho Jeong" <daehojeong@google.com> 637Description: Show the peak value of total current atomic write block count after boot. 638 If you write "0" here, you can initialize to "0". 639 640What: /sys/fs/f2fs/<disk>/committed_atomic_block 641Date: July 2022 642Contact: "Daeho Jeong" <daehojeong@google.com> 643Description: Show the accumulated total committed atomic write block count after boot. 644 If you write "0" here, you can initialize to "0". 645 646What: /sys/fs/f2fs/<disk>/revoked_atomic_block 647Date: July 2022 648Contact: "Daeho Jeong" <daehojeong@google.com> 649Description: Show the accumulated total revoked atomic write block count after boot. 650 If you write "0" here, you can initialize to "0". 651 652What: /sys/fs/f2fs/<disk>/gc_mode 653Date: October 2022 654Contact: "Yangtao Li" <frank.li@vivo.com> 655Description: Show the current gc_mode as a string. 656 This is a read-only entry. 657 658What: /sys/fs/f2fs/<disk>/discard_urgent_util 659Date: November 2022 660Contact: "Yangtao Li" <frank.li@vivo.com> 661Description: When space utilization exceeds this, do background DISCARD aggressively. 662 Does DISCARD forcibly in a period of given min_discard_issue_time when the number 663 of discards is not 0 and set discard granularity to 1. 664 Default: 80 665 666What: /sys/fs/f2fs/<disk>/hot_data_age_threshold 667Date: November 2022 668Contact: "Ping Xiong" <xiongping1@xiaomi.com> 669Description: When DATA SEPARATION is on, it controls the age threshold to indicate 670 the data blocks as hot. By default it was initialized as 262144 blocks 671 (equals to 1GB). 672 673What: /sys/fs/f2fs/<disk>/warm_data_age_threshold 674Date: November 2022 675Contact: "Ping Xiong" <xiongping1@xiaomi.com> 676Description: When DATA SEPARATION is on, it controls the age threshold to indicate 677 the data blocks as warm. By default it was initialized as 2621440 blocks 678 (equals to 10GB). 679 680What: /sys/fs/f2fs/<disk>/fault_rate 681Date: May 2016 682Contact: "Sheng Yong" <shengyong@oppo.com> 683Contact: "Chao Yu" <chao@kernel.org> 684Description: Enable fault injection in all supported types with 685 specified injection rate. 686 687What: /sys/fs/f2fs/<disk>/fault_type 688Date: May 2016 689Contact: "Sheng Yong" <shengyong@oppo.com> 690Contact: "Chao Yu" <chao@kernel.org> 691Description: Support configuring fault injection type, should be 692 enabled with fault_injection option, fault type value 693 is shown below, it supports single or combined type. 694 695 =================== =========== 696 Type_Name Type_Value 697 =================== =========== 698 FAULT_KMALLOC 0x000000001 699 FAULT_KVMALLOC 0x000000002 700 FAULT_PAGE_ALLOC 0x000000004 701 FAULT_PAGE_GET 0x000000008 702 FAULT_ALLOC_BIO 0x000000010 (obsolete) 703 FAULT_ALLOC_NID 0x000000020 704 FAULT_ORPHAN 0x000000040 705 FAULT_BLOCK 0x000000080 706 FAULT_DIR_DEPTH 0x000000100 707 FAULT_EVICT_INODE 0x000000200 708 FAULT_TRUNCATE 0x000000400 709 FAULT_READ_IO 0x000000800 710 FAULT_CHECKPOINT 0x000001000 711 FAULT_DISCARD 0x000002000 712 FAULT_WRITE_IO 0x000004000 713 FAULT_SLAB_ALLOC 0x000008000 714 FAULT_DQUOT_INIT 0x000010000 715 FAULT_LOCK_OP 0x000020000 716 FAULT_BLKADDR 0x000040000 717 =================== =========== 718 719What: /sys/fs/f2fs/<disk>/discard_io_aware_gran 720Date: January 2023 721Contact: "Yangtao Li" <frank.li@vivo.com> 722Description: Controls background discard granularity of inner discard thread 723 when is not in idle. Inner thread will not issue discards with size that 724 is smaller than granularity. The unit size is one block(4KB), now only 725 support configuring in range of [0, 512]. 726 Default: 512 727 728What: /sys/fs/f2fs/<disk>/last_age_weight 729Date: January 2023 730Contact: "Ping Xiong" <xiongping1@xiaomi.com> 731Description: When DATA SEPARATION is on, it controls the weight of last data block age. 732