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