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 0x01 F2FS_IPU_FORCE 54 0x02 F2FS_IPU_SSR 55 0x04 F2FS_IPU_UTIL 56 0x08 F2FS_IPU_SSR_UTIL 57 0x10 F2FS_IPU_FSYNC 58 0x20 F2FS_IPU_ASYNC, 59 0x40 F2FS_IPU_NOCACHE 60 ==== ================= 61 62 Refer segment.h for details. 63 64What: /sys/fs/f2fs/<disk>/min_ipu_util 65Date: November 2013 66Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 67Description: Controls the FS utilization condition for the in-place-update 68 policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies. 69 70What: /sys/fs/f2fs/<disk>/min_fsync_blocks 71Date: September 2014 72Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 73Description: Controls the dirty page count condition for the in-place-update 74 policies. 75 76What: /sys/fs/f2fs/<disk>/min_seq_blocks 77Date: August 2018 78Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 79Description: Controls the dirty page count condition for batched sequential 80 writes in writepages. 81 82What: /sys/fs/f2fs/<disk>/min_hot_blocks 83Date: March 2017 84Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 85Description: Controls the dirty page count condition for redefining hot data. 86 87What: /sys/fs/f2fs/<disk>/min_ssr_sections 88Date: October 2017 89Contact: "Chao Yu" <yuchao0@huawei.com> 90Description: Controls the free section threshold to trigger SSR allocation. 91 If this is large, SSR mode will be enabled early. 92 93What: /sys/fs/f2fs/<disk>/max_small_discards 94Date: November 2013 95Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 96Description: Controls the issue rate of discard commands that consist of small 97 blocks less than 2MB. The candidates to be discarded are cached until 98 checkpoint is triggered, and issued during the checkpoint. 99 By default, it is disabled with 0. 100 101What: /sys/fs/f2fs/<disk>/discard_granularity 102Date: July 2017 103Contact: "Chao Yu" <yuchao0@huawei.com> 104Description: Controls discard granularity of inner discard thread. Inner thread 105 will not issue discards with size that is smaller than granularity. 106 The unit size is one block(4KB), now only support configuring 107 in range of [1, 512]. Default value is 4(=16KB). 108 109What: /sys/fs/f2fs/<disk>/umount_discard_timeout 110Date: January 2019 111Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 112Description: Set timeout to issue discard commands during umount. 113 Default: 5 secs 114 115What: /sys/fs/f2fs/<disk>/max_victim_search 116Date: January 2014 117Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 118Description: Controls the number of trials to find a victim segment 119 when conducting SSR and cleaning operations. The default value 120 is 4096 which covers 8GB block address range. 121 122What: /sys/fs/f2fs/<disk>/migration_granularity 123Date: October 2018 124Contact: "Chao Yu" <yuchao0@huawei.com> 125Description: Controls migration granularity of garbage collection on large 126 section, it can let GC move partial segment{s} of one section 127 in one GC cycle, so that dispersing heavy overhead GC to 128 multiple lightweight one. 129 130What: /sys/fs/f2fs/<disk>/dir_level 131Date: March 2014 132Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 133Description: Controls the directory level for large directory. If a 134 directory has a number of files, it can reduce the file lookup 135 latency by increasing this dir_level value. Otherwise, it 136 needs to decrease this value to reduce the space overhead. 137 The default value is 0. 138 139What: /sys/fs/f2fs/<disk>/ram_thresh 140Date: March 2014 141Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 142Description: Controls the memory footprint used by free nids and cached 143 nat entries. By default, 1 is set, which indicates 144 10 MB / 1 GB RAM. 145 146What: /sys/fs/f2fs/<disk>/batched_trim_sections 147Date: February 2015 148Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 149Description: Controls the trimming rate in batch mode. 150 <deprecated> 151 152What: /sys/fs/f2fs/<disk>/cp_interval 153Date: October 2015 154Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 155Description: Controls the checkpoint timing, set to 60 seconds by default. 156 157What: /sys/fs/f2fs/<disk>/idle_interval 158Date: January 2016 159Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 160Description: Controls the idle timing of system, if there is no FS operation 161 during given interval. 162 Set to 5 seconds by default. 163 164What: /sys/fs/f2fs/<disk>/discard_idle_interval 165Date: September 2018 166Contact: "Chao Yu" <yuchao0@huawei.com> 167Contact: "Sahitya Tummala" <stummala@codeaurora.org> 168Description: Controls the idle timing of discard thread given 169 this time interval. 170 Default is 5 secs. 171 172What: /sys/fs/f2fs/<disk>/gc_idle_interval 173Date: September 2018 174Contact: "Chao Yu" <yuchao0@huawei.com> 175Contact: "Sahitya Tummala" <stummala@codeaurora.org> 176Description: Controls the idle timing for gc path. Set to 5 seconds by default. 177 178What: /sys/fs/f2fs/<disk>/iostat_enable 179Date: August 2017 180Contact: "Chao Yu" <yuchao0@huawei.com> 181Description: Controls to enable/disable IO stat. 182 183What: /sys/fs/f2fs/<disk>/ra_nid_pages 184Date: October 2015 185Contact: "Chao Yu" <chao2.yu@samsung.com> 186Description: Controls the count of nid pages to be readaheaded. 187 When building free nids, F2FS reads NAT blocks ahead for 188 speed up. Default is 0. 189 190What: /sys/fs/f2fs/<disk>/dirty_nats_ratio 191Date: January 2016 192Contact: "Chao Yu" <chao2.yu@samsung.com> 193Description: Controls dirty nat entries ratio threshold, if current 194 ratio exceeds configured threshold, checkpoint will 195 be triggered for flushing dirty nat entries. 196 197What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes 198Date: January 2016 199Contact: "Shuoran Liu" <liushuoran@huawei.com> 200Description: Shows total written kbytes issued to disk. 201 202What: /sys/fs/f2fs/<disk>/features 203Date: July 2017 204Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 205Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/ 206 Shows all enabled features in current device. 207 Supported features: 208 encryption, blkzoned, extra_attr, projquota, inode_checksum, 209 flexible_inline_xattr, quota_ino, inode_crtime, lost_found, 210 verity, sb_checksum, casefold, readonly, compression, pin_file. 211 212What: /sys/fs/f2fs/<disk>/feature_list/ 213Date: June 2021 214Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 215Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule. 216 Supported on-disk features: 217 encryption, block_zoned (aka blkzoned), extra_attr, 218 project_quota (aka projquota), inode_checksum, 219 flexible_inline_xattr, quota_ino, inode_crtime, lost_found, 220 verity, sb_checksum, casefold, readonly, compression. 221 Note that, pin_file is moved into /sys/fs/f2fs/features/. 222 223What: /sys/fs/f2fs/features/ 224Date: July 2017 225Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 226Description: Shows all enabled kernel features. 227 Supported features: 228 encryption, block_zoned, extra_attr, project_quota, 229 inode_checksum, flexible_inline_xattr, quota_ino, 230 inode_crtime, lost_found, verity, sb_checksum, 231 casefold, readonly, compression, test_dummy_encryption_v2, 232 atomic_write, pin_file, encrypted_casefold. 233 234What: /sys/fs/f2fs/<disk>/inject_rate 235Date: May 2016 236Contact: "Sheng Yong" <shengyong1@huawei.com> 237Description: Controls the injection rate of arbitrary faults. 238 239What: /sys/fs/f2fs/<disk>/inject_type 240Date: May 2016 241Contact: "Sheng Yong" <shengyong1@huawei.com> 242Description: Controls the injection type of arbitrary faults. 243 244What: /sys/fs/f2fs/<disk>/dirty_segments 245Date: October 2017 246Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 247Description: Shows the number of dirty segments. 248 249What: /sys/fs/f2fs/<disk>/reserved_blocks 250Date: June 2017 251Contact: "Chao Yu" <yuchao0@huawei.com> 252Description: Controls target reserved blocks in system, the threshold 253 is soft, it could exceed current available user space. 254 255What: /sys/fs/f2fs/<disk>/current_reserved_blocks 256Date: October 2017 257Contact: "Yunlong Song" <yunlong.song@huawei.com> 258Contact: "Chao Yu" <yuchao0@huawei.com> 259Description: Shows current reserved blocks in system, it may be temporarily 260 smaller than target_reserved_blocks, but will gradually 261 increase to target_reserved_blocks when more free blocks are 262 freed by user later. 263 264What: /sys/fs/f2fs/<disk>/gc_urgent 265Date: August 2017 266Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 267Description: Do background GC aggressively when set. When gc_urgent = 1, 268 background thread starts to do GC by given gc_urgent_sleep_time 269 interval. When gc_urgent = 2, F2FS will lower the bar of 270 checking idle in order to process outstanding discard commands 271 and GC a little bit aggressively. It is set to 0 by default. 272 273What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time 274Date: August 2017 275Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 276Description: Controls sleep time of GC urgent mode. Set to 500ms by default. 277 278What: /sys/fs/f2fs/<disk>/readdir_ra 279Date: November 2017 280Contact: "Sheng Yong" <shengyong1@huawei.com> 281Description: Controls readahead inode block in readdir. Enabled by default. 282 283What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh 284Date: January 2018 285Contact: Jaegeuk Kim <jaegeuk@kernel.org> 286Description: This indicates how many GC can be failed for the pinned 287 file. If it exceeds this, F2FS doesn't guarantee its pinning 288 state. 2048 trials is set by default. 289 290What: /sys/fs/f2fs/<disk>/extension_list 291Date: Feburary 2018 292Contact: "Chao Yu" <yuchao0@huawei.com> 293Description: Used to control configure extension list: 294 - Query: cat /sys/fs/f2fs/<disk>/extension_list 295 - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list 296 - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list 297 - [h] means add/del hot file extension 298 - [c] means add/del cold file extension 299 300What: /sys/fs/f2fs/<disk>/unusable 301Date April 2019 302Contact: "Daniel Rosenberg" <drosen@google.com> 303Description: If checkpoint=disable, it displays the number of blocks that 304 are unusable. 305 If checkpoint=enable it displays the number of blocks that 306 would be unusable if checkpoint=disable were to be set. 307 308What: /sys/fs/f2fs/<disk>/encoding 309Date July 2019 310Contact: "Daniel Rosenberg" <drosen@google.com> 311Description: Displays name and version of the encoding set for the filesystem. 312 If no encoding is set, displays (none) 313 314What: /sys/fs/f2fs/<disk>/free_segments 315Date: September 2019 316Contact: "Hridya Valsaraju" <hridya@google.com> 317Description: Number of free segments in disk. 318 319What: /sys/fs/f2fs/<disk>/cp_foreground_calls 320Date: September 2019 321Contact: "Hridya Valsaraju" <hridya@google.com> 322Description: Number of checkpoint operations performed on demand. Available when 323 CONFIG_F2FS_STAT_FS=y. 324 325What: /sys/fs/f2fs/<disk>/cp_background_calls 326Date: September 2019 327Contact: "Hridya Valsaraju" <hridya@google.com> 328Description: Number of checkpoint operations performed in the background to 329 free segments. Available when CONFIG_F2FS_STAT_FS=y. 330 331What: /sys/fs/f2fs/<disk>/gc_foreground_calls 332Date: September 2019 333Contact: "Hridya Valsaraju" <hridya@google.com> 334Description: Number of garbage collection operations performed on demand. 335 Available when CONFIG_F2FS_STAT_FS=y. 336 337What: /sys/fs/f2fs/<disk>/gc_background_calls 338Date: September 2019 339Contact: "Hridya Valsaraju" <hridya@google.com> 340Description: Number of garbage collection operations triggered in background. 341 Available when CONFIG_F2FS_STAT_FS=y. 342 343What: /sys/fs/f2fs/<disk>/moved_blocks_foreground 344Date: September 2019 345Contact: "Hridya Valsaraju" <hridya@google.com> 346Description: Number of blocks moved by garbage collection in foreground. 347 Available when CONFIG_F2FS_STAT_FS=y. 348 349What: /sys/fs/f2fs/<disk>/moved_blocks_background 350Date: September 2019 351Contact: "Hridya Valsaraju" <hridya@google.com> 352Description: Number of blocks moved by garbage collection in background. 353 Available when CONFIG_F2FS_STAT_FS=y. 354 355What: /sys/fs/f2fs/<disk>/avg_vblocks 356Date: September 2019 357Contact: "Hridya Valsaraju" <hridya@google.com> 358Description: Average number of valid blocks. 359 Available when CONFIG_F2FS_STAT_FS=y. 360 361What: /sys/fs/f2fs/<disk>/mounted_time_sec 362Date: February 2020 363Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 364Description: Show the mounted time in secs of this partition. 365 366What: /sys/fs/f2fs/<disk>/data_io_flag 367Date: April 2020 368Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 369Description: Give a way to attach REQ_META|FUA to data writes 370 given temperature-based bits. Now the bits indicate: 371 372 +-------------------+-------------------+ 373 | REQ_META | REQ_FUA | 374 +------+------+-----+------+------+-----+ 375 | 5 | 4 | 3 | 2 | 1 | 0 | 376 +------+------+-----+------+------+-----+ 377 | Cold | Warm | Hot | Cold | Warm | Hot | 378 +------+------+-----+------+------+-----+ 379 380What: /sys/fs/f2fs/<disk>/node_io_flag 381Date: June 2020 382Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 383Description: Give a way to attach REQ_META|FUA to node writes 384 given temperature-based bits. Now the bits indicate: 385 386 +-------------------+-------------------+ 387 | REQ_META | REQ_FUA | 388 +------+------+-----+------+------+-----+ 389 | 5 | 4 | 3 | 2 | 1 | 0 | 390 +------+------+-----+------+------+-----+ 391 | Cold | Warm | Hot | Cold | Warm | Hot | 392 +------+------+-----+------+------+-----+ 393 394What: /sys/fs/f2fs/<disk>/iostat_period_ms 395Date: April 2020 396Contact: "Daeho Jeong" <daehojeong@google.com> 397Description: Give a way to change iostat_period time. 3secs by default. 398 The new iostat trace gives stats gap given the period. 399What: /sys/fs/f2fs/<disk>/max_io_bytes 400Date: December 2020 401Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 402Description: This gives a control to limit the bio size in f2fs. 403 Default is zero, which will follow underlying block layer limit, 404 whereas, if it has a certain bytes value, f2fs won't submit a 405 bio larger than that size. 406 407What: /sys/fs/f2fs/<disk>/stat/sb_status 408Date: December 2020 409Contact: "Chao Yu" <yuchao0@huawei.com> 410Description: Show status of f2fs superblock in real time. 411 412 ====== ===================== ================================= 413 value sb status macro description 414 0x1 SBI_IS_DIRTY dirty flag for checkpoint 415 0x2 SBI_IS_CLOSE specify unmounting 416 0x4 SBI_NEED_FSCK need fsck.f2fs to fix 417 0x8 SBI_POR_DOING recovery is doing or not 418 0x10 SBI_NEED_SB_WRITE need to recover superblock 419 0x20 SBI_NEED_CP need to checkpoint 420 0x40 SBI_IS_SHUTDOWN shutdown by ioctl 421 0x80 SBI_IS_RECOVERED recovered orphan/data 422 0x100 SBI_CP_DISABLED CP was disabled last mount 423 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly 424 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP 425 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP 426 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted 427 0x2000 SBI_IS_RESIZEFS resizefs is in process 428 ====== ===================== ================================= 429 430What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio 431Date: January 2021 432Contact: "Daeho Jeong" <daehojeong@google.com> 433Description: Give a way to change checkpoint merge daemon's io priority. 434 Its default value is "be,3", which means "BE" I/O class and 435 I/O priority "3". We can select the class between "rt" and "be", 436 and set the I/O priority within valid range of it. "," delimiter 437 is necessary in between I/O class and priority number. 438 439What: /sys/fs/f2fs/<disk>/ovp_segments 440Date: March 2021 441Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 442Description: Shows the number of overprovision segments. 443 444What: /sys/fs/f2fs/<disk>/compr_written_block 445Date: March 2021 446Contact: "Daeho Jeong" <daehojeong@google.com> 447Description: Show the block count written after compression since mount. Note 448 that when the compressed blocks are deleted, this count doesn't 449 decrease. If you write "0" here, you can initialize 450 compr_written_block and compr_saved_block to "0". 451 452What: /sys/fs/f2fs/<disk>/compr_saved_block 453Date: March 2021 454Contact: "Daeho Jeong" <daehojeong@google.com> 455Description: Show the saved block count with compression since mount. Note 456 that when the compressed blocks are deleted, this count doesn't 457 decrease. If you write "0" here, you can initialize 458 compr_written_block and compr_saved_block to "0". 459 460What: /sys/fs/f2fs/<disk>/compr_new_inode 461Date: March 2021 462Contact: "Daeho Jeong" <daehojeong@google.com> 463Description: Show the count of inode newly enabled for compression since mount. 464 Note that when the compression is disabled for the files, this count 465 doesn't decrease. If you write "0" here, you can initialize 466 compr_new_inode to "0". 467 468What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio 469Date: May 2021 470Contact: "Chao Yu" <yuchao0@huawei.com> 471Description: When ATGC is on, it controls candidate ratio in order to limit total 472 number of potential victim in all candidates, the value should be in 473 range of [0, 100], by default it was initialized as 20(%). 474 475What: /sys/fs/f2fs/<disk>/atgc_candidate_count 476Date: May 2021 477Contact: "Chao Yu" <yuchao0@huawei.com> 478Description: When ATGC is on, it controls candidate count in order to limit total 479 number of potential victim in all candidates, by default it was 480 initialized as 10 (sections). 481 482What: /sys/fs/f2fs/<disk>/atgc_age_weight 483Date: May 2021 484Contact: "Chao Yu" <yuchao0@huawei.com> 485Description: When ATGC is on, it controls age weight to balance weight proportion 486 in between aging and valid blocks, the value should be in range of 487 [0, 100], by default it was initialized as 60(%). 488 489What: /sys/fs/f2fs/<disk>/atgc_age_threshold 490Date: May 2021 491Contact: "Chao Yu" <yuchao0@huawei.com> 492Description: When ATGC is on, it controls age threshold to bypass GCing young 493 candidates whose age is not beyond the threshold, by default it was 494 initialized as 604800 seconds (equals to 7 days). 495 496What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments 497Date: July 2021 498Contact: "Daeho Jeong" <daehojeong@google.com> 499Description: Show how many segments have been reclaimed by GC during a specific 500 GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy, 501 3: GC idle AT, 4: GC urgent high, 5: GC urgent low) 502 You can re-initialize this value to "0". 503 504What: /sys/fs/f2fs/<disk>/gc_segment_mode 505Date: July 2021 506Contact: "Daeho Jeong" <daehojeong@google.com> 507Description: You can control for which gc mode the "gc_reclaimed_segments" node shows. 508 Refer to the description of the modes in "gc_reclaimed_segments". 509 510What: /sys/fs/f2fs/<disk>/seq_file_ra_mul 511Date: July 2021 512Contact: "Daeho Jeong" <daehojeong@google.com> 513Description: You can control the multiplier value of bdi device readahead window size 514 between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option. 515