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 gc_idle = 1 will select the Cost Benefit approach & setting 25 gc_idle = 2 will select the greedy approach. 26 27What: /sys/fs/f2fs/<disk>/reclaim_segments 28Date: October 2013 29Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 30Description: This parameter controls the number of prefree segments to be 31 reclaimed. If the number of prefree segments is larger than 32 the number of segments in the proportion to the percentage 33 over total volume size, f2fs tries to conduct checkpoint to 34 reclaim the prefree segments to free segments. 35 By default, 5% over total # of segments. 36 37What: /sys/fs/f2fs/<disk>/main_blkaddr 38Date: November 2019 39Contact: "Ramon Pantin" <pantin@google.com> 40Description: 41 Shows first block address of MAIN area. 42 43What: /sys/fs/f2fs/<disk>/ipu_policy 44Date: November 2013 45Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 46Description: Controls the in-place-update policy. 47 updates in f2fs. User can set: 48 0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR, 49 0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL, 50 0x10: F2FS_IPU_FSYNC, 0x20: F2FS_IPU_ASYNC, 51 0x40: F2FS_IPU_NOCACHE. 52 Refer segment.h for details. 53 54What: /sys/fs/f2fs/<disk>/min_ipu_util 55Date: November 2013 56Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 57Description: Controls the FS utilization condition for the in-place-update 58 policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies. 59 60What: /sys/fs/f2fs/<disk>/min_fsync_blocks 61Date: September 2014 62Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 63Description: Controls the dirty page count condition for the in-place-update 64 policies. 65 66What: /sys/fs/f2fs/<disk>/min_seq_blocks 67Date: August 2018 68Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 69Description: Controls the dirty page count condition for batched sequential 70 writes in writepages. 71 72What: /sys/fs/f2fs/<disk>/min_hot_blocks 73Date: March 2017 74Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 75Description: Controls the dirty page count condition for redefining hot data. 76 77What: /sys/fs/f2fs/<disk>/min_ssr_sections 78Date: October 2017 79Contact: "Chao Yu" <yuchao0@huawei.com> 80Description: Controls the free section threshold to trigger SSR allocation. 81 If this is large, SSR mode will be enabled early. 82 83What: /sys/fs/f2fs/<disk>/max_small_discards 84Date: November 2013 85Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 86Description: Controls the issue rate of discard commands that consist of small 87 blocks less than 2MB. The candidates to be discarded are cached until 88 checkpoint is triggered, and issued during the checkpoint. 89 By default, it is disabled with 0. 90 91What: /sys/fs/f2fs/<disk>/discard_granularity 92Date: July 2017 93Contact: "Chao Yu" <yuchao0@huawei.com> 94Description: Controls discard granularity of inner discard thread. Inner thread 95 will not issue discards with size that is smaller than granularity. 96 The unit size is one block(4KB), now only support configuring 97 in range of [1, 512]. Default value is 4(=16KB). 98 99What: /sys/fs/f2fs/<disk>/umount_discard_timeout 100Date: January 2019 101Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 102Description: Set timeout to issue discard commands during umount. 103 Default: 5 secs 104 105What: /sys/fs/f2fs/<disk>/max_victim_search 106Date: January 2014 107Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 108Description: Controls the number of trials to find a victim segment 109 when conducting SSR and cleaning operations. The default value 110 is 4096 which covers 8GB block address range. 111 112What: /sys/fs/f2fs/<disk>/migration_granularity 113Date: October 2018 114Contact: "Chao Yu" <yuchao0@huawei.com> 115Description: Controls migration granularity of garbage collection on large 116 section, it can let GC move partial segment{s} of one section 117 in one GC cycle, so that dispersing heavy overhead GC to 118 multiple lightweight one. 119 120What: /sys/fs/f2fs/<disk>/dir_level 121Date: March 2014 122Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 123Description: Controls the directory level for large directory. If a 124 directory has a number of files, it can reduce the file lookup 125 latency by increasing this dir_level value. Otherwise, it 126 needs to decrease this value to reduce the space overhead. 127 The default value is 0. 128 129What: /sys/fs/f2fs/<disk>/ram_thresh 130Date: March 2014 131Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> 132Description: Controls the memory footprint used by free nids and cached 133 nat entries. By default, 1 is set, which indicates 134 10 MB / 1 GB RAM. 135 136What: /sys/fs/f2fs/<disk>/batched_trim_sections 137Date: February 2015 138Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 139Description: Controls the trimming rate in batch mode. 140 <deprecated> 141 142What: /sys/fs/f2fs/<disk>/cp_interval 143Date: October 2015 144Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 145Description: Controls the checkpoint timing, set to 60 seconds by default. 146 147What: /sys/fs/f2fs/<disk>/idle_interval 148Date: January 2016 149Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 150Description: Controls the idle timing of system, if there is no FS operation 151 during given interval. 152 Set to 5 seconds by default. 153 154What: /sys/fs/f2fs/<disk>/discard_idle_interval 155Date: September 2018 156Contact: "Chao Yu" <yuchao0@huawei.com> 157Contact: "Sahitya Tummala" <stummala@codeaurora.org> 158Description: Controls the idle timing of discard thread given 159 this time interval. 160 Default is 5 secs. 161 162What: /sys/fs/f2fs/<disk>/gc_idle_interval 163Date: September 2018 164Contact: "Chao Yu" <yuchao0@huawei.com> 165Contact: "Sahitya Tummala" <stummala@codeaurora.org> 166Description: Controls the idle timing for gc path. Set to 5 seconds by default. 167 168What: /sys/fs/f2fs/<disk>/iostat_enable 169Date: August 2017 170Contact: "Chao Yu" <yuchao0@huawei.com> 171Description: Controls to enable/disable IO stat. 172 173What: /sys/fs/f2fs/<disk>/ra_nid_pages 174Date: October 2015 175Contact: "Chao Yu" <chao2.yu@samsung.com> 176Description: Controls the count of nid pages to be readaheaded. 177 When building free nids, F2FS reads NAT blocks ahead for 178 speed up. Default is 0. 179 180What: /sys/fs/f2fs/<disk>/dirty_nats_ratio 181Date: January 2016 182Contact: "Chao Yu" <chao2.yu@samsung.com> 183Description: Controls dirty nat entries ratio threshold, if current 184 ratio exceeds configured threshold, checkpoint will 185 be triggered for flushing dirty nat entries. 186 187What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes 188Date: January 2016 189Contact: "Shuoran Liu" <liushuoran@huawei.com> 190Description: Shows total written kbytes issued to disk. 191 192What: /sys/fs/f2fs/<disk>/features 193Date: July 2017 194Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 195Description: Shows all enabled features in current device. 196 197What: /sys/fs/f2fs/<disk>/inject_rate 198Date: May 2016 199Contact: "Sheng Yong" <shengyong1@huawei.com> 200Description: Controls the injection rate of arbitrary faults. 201 202What: /sys/fs/f2fs/<disk>/inject_type 203Date: May 2016 204Contact: "Sheng Yong" <shengyong1@huawei.com> 205Description: Controls the injection type of arbitrary faults. 206 207What: /sys/fs/f2fs/<disk>/dirty_segments 208Date: October 2017 209Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 210Description: Shows the number of dirty segments. 211 212What: /sys/fs/f2fs/<disk>/reserved_blocks 213Date: June 2017 214Contact: "Chao Yu" <yuchao0@huawei.com> 215Description: Controls target reserved blocks in system, the threshold 216 is soft, it could exceed current available user space. 217 218What: /sys/fs/f2fs/<disk>/current_reserved_blocks 219Date: October 2017 220Contact: "Yunlong Song" <yunlong.song@huawei.com> 221Contact: "Chao Yu" <yuchao0@huawei.com> 222Description: Shows current reserved blocks in system, it may be temporarily 223 smaller than target_reserved_blocks, but will gradually 224 increase to target_reserved_blocks when more free blocks are 225 freed by user later. 226 227What: /sys/fs/f2fs/<disk>/gc_urgent 228Date: August 2017 229Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 230Description: Do background GC agressively when set. When gc_urgent = 1, 231 background thread starts to do GC by given gc_urgent_sleep_time 232 interval. When gc_urgent = 2, F2FS will lower the bar of 233 checking idle in order to process outstanding discard commands 234 and GC a little bit aggressively. It is set to 0 by default. 235 236What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time 237Date: August 2017 238Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 239Description: Controls sleep time of GC urgent mode. Set to 500ms by default. 240 241What: /sys/fs/f2fs/<disk>/readdir_ra 242Date: November 2017 243Contact: "Sheng Yong" <shengyong1@huawei.com> 244Description: Controls readahead inode block in readdir. Enabled by default. 245 246What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh 247Date: January 2018 248Contact: Jaegeuk Kim <jaegeuk@kernel.org> 249Description: This indicates how many GC can be failed for the pinned 250 file. If it exceeds this, F2FS doesn't guarantee its pinning 251 state. 2048 trials is set by default. 252 253What: /sys/fs/f2fs/<disk>/extension_list 254Date: Feburary 2018 255Contact: "Chao Yu" <yuchao0@huawei.com> 256Description: Used to control configure extension list: 257 - Query: cat /sys/fs/f2fs/<disk>/extension_list 258 - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list 259 - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list 260 - [h] means add/del hot file extension 261 - [c] means add/del cold file extension 262 263What: /sys/fs/f2fs/<disk>/unusable 264Date April 2019 265Contact: "Daniel Rosenberg" <drosen@google.com> 266Description: If checkpoint=disable, it displays the number of blocks that 267 are unusable. 268 If checkpoint=enable it displays the enumber of blocks that 269 would be unusable if checkpoint=disable were to be set. 270 271What: /sys/fs/f2fs/<disk>/encoding 272Date July 2019 273Contact: "Daniel Rosenberg" <drosen@google.com> 274Description: Displays name and version of the encoding set for the filesystem. 275 If no encoding is set, displays (none) 276 277What: /sys/fs/f2fs/<disk>/free_segments 278Date: September 2019 279Contact: "Hridya Valsaraju" <hridya@google.com> 280Description: Number of free segments in disk. 281 282What: /sys/fs/f2fs/<disk>/cp_foreground_calls 283Date: September 2019 284Contact: "Hridya Valsaraju" <hridya@google.com> 285Description: Number of checkpoint operations performed on demand. Available when 286 CONFIG_F2FS_STAT_FS=y. 287 288What: /sys/fs/f2fs/<disk>/cp_background_calls 289Date: September 2019 290Contact: "Hridya Valsaraju" <hridya@google.com> 291Description: Number of checkpoint operations performed in the background to 292 free segments. Available when CONFIG_F2FS_STAT_FS=y. 293 294What: /sys/fs/f2fs/<disk>/gc_foreground_calls 295Date: September 2019 296Contact: "Hridya Valsaraju" <hridya@google.com> 297Description: Number of garbage collection operations performed on demand. 298 Available when CONFIG_F2FS_STAT_FS=y. 299 300What: /sys/fs/f2fs/<disk>/gc_background_calls 301Date: September 2019 302Contact: "Hridya Valsaraju" <hridya@google.com> 303Description: Number of garbage collection operations triggered in background. 304 Available when CONFIG_F2FS_STAT_FS=y. 305 306What: /sys/fs/f2fs/<disk>/moved_blocks_foreground 307Date: September 2019 308Contact: "Hridya Valsaraju" <hridya@google.com> 309Description: Number of blocks moved by garbage collection in foreground. 310 Available when CONFIG_F2FS_STAT_FS=y. 311 312What: /sys/fs/f2fs/<disk>/moved_blocks_background 313Date: September 2019 314Contact: "Hridya Valsaraju" <hridya@google.com> 315Description: Number of blocks moved by garbage collection in background. 316 Available when CONFIG_F2FS_STAT_FS=y. 317 318What: /sys/fs/f2fs/<disk>/avg_vblocks 319Date: September 2019 320Contact: "Hridya Valsaraju" <hridya@google.com> 321Description: Average number of valid blocks. 322 Available when CONFIG_F2FS_STAT_FS=y. 323 324What: /sys/fs/f2fs/<disk>/mounted_time_sec 325Date: February 2020 326Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 327Description: Show the mounted time in secs of this partition. 328 329What: /sys/fs/f2fs/<disk>/data_io_flag 330Date: April 2020 331Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 332Description: Give a way to attach REQ_META|FUA to data writes 333 given temperature-based bits. Now the bits indicate: 334 * REQ_META | REQ_FUA | 335 * 5 | 4 | 3 | 2 | 1 | 0 | 336 * Cold | Warm | Hot | Cold | Warm | Hot | 337 338What: /sys/fs/f2fs/<disk>/node_io_flag 339Date: June 2020 340Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 341Description: Give a way to attach REQ_META|FUA to node writes 342 given temperature-based bits. Now the bits indicate: 343 * REQ_META | REQ_FUA | 344 * 5 | 4 | 3 | 2 | 1 | 0 | 345 * Cold | Warm | Hot | Cold | Warm | Hot | 346 347What: /sys/fs/f2fs/<disk>/iostat_period_ms 348Date: April 2020 349Contact: "Daeho Jeong" <daehojeong@google.com> 350Description: Give a way to change iostat_period time. 3secs by default. 351 The new iostat trace gives stats gap given the period. 352