xref: /linux/Documentation/ABI/testing/sysfs-fs-f2fs (revision 25768de50b1f2dbb6ea44bd5148a87fe2c9c3688)
1b59d0baeSNamjae JeonWhat:		/sys/fs/f2fs/<disk>/gc_max_sleep_time
2b59d0baeSNamjae JeonDate:		July 2013
3b59d0baeSNamjae JeonContact:	"Namjae Jeon" <namjae.jeon@samsung.com>
4f5fa7c8bSHridya ValsarajuDescription:	Controls the maximum sleep time for gc_thread. Time
5b59d0baeSNamjae Jeon		is in milliseconds.
6b59d0baeSNamjae Jeon
7b59d0baeSNamjae JeonWhat:		/sys/fs/f2fs/<disk>/gc_min_sleep_time
8b59d0baeSNamjae JeonDate:		July 2013
9b59d0baeSNamjae JeonContact:	"Namjae Jeon" <namjae.jeon@samsung.com>
10f5fa7c8bSHridya ValsarajuDescription:	Controls the minimum sleep time for gc_thread. Time
11b59d0baeSNamjae Jeon		is in milliseconds.
12b59d0baeSNamjae Jeon
13b59d0baeSNamjae JeonWhat:		/sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
14b59d0baeSNamjae JeonDate:		July 2013
15b59d0baeSNamjae JeonContact:	"Namjae Jeon" <namjae.jeon@samsung.com>
16f5fa7c8bSHridya ValsarajuDescription:	Controls the default sleep time for gc_thread. Time
17b59d0baeSNamjae Jeon		is in milliseconds.
18d2dc095fSNamjae Jeon
19d2dc095fSNamjae JeonWhat:		/sys/fs/f2fs/<disk>/gc_idle
20d2dc095fSNamjae JeonDate:		July 2013
21d2dc095fSNamjae JeonContact:	"Namjae Jeon" <namjae.jeon@samsung.com>
22f5fa7c8bSHridya ValsarajuDescription:	Controls the victim selection policy for garbage collection.
2354a19b4dSMauro Carvalho Chehab		Setting gc_idle = 0(default) will disable this option. Setting:
2454a19b4dSMauro Carvalho Chehab
2554a19b4dSMauro Carvalho Chehab		===========  ===============================================
26f5fa7c8bSHridya Valsaraju		gc_idle = 1  will select the Cost Benefit approach & setting
27093749e2SChao Yu		gc_idle = 2  will select the greedy approach & setting
28093749e2SChao Yu		gc_idle = 3  will select the age-threshold based approach.
2954a19b4dSMauro Carvalho Chehab		===========  ===============================================
303bac380cSJaegeuk Kim
313bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/reclaim_segments
323bac380cSJaegeuk KimDate:		October 2013
333bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
34f5fa7c8bSHridya ValsarajuDescription:	This parameter controls the number of prefree segments to be
35f5fa7c8bSHridya Valsaraju		reclaimed. If the number of prefree segments is larger than
36f5fa7c8bSHridya Valsaraju		the number of segments in the proportion to the percentage
37f5fa7c8bSHridya Valsaraju		over total volume size, f2fs tries to conduct checkpoint to
38f5fa7c8bSHridya Valsaraju		reclaim the prefree segments to free segments.
39f5fa7c8bSHridya Valsaraju		By default, 5% over total # of segments.
403bac380cSJaegeuk Kim
41f5fa7c8bSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/main_blkaddr
42a4db59acSJaegeuk KimDate:		November 2019
43a4db59acSJaegeuk KimContact:	"Ramon Pantin" <pantin@google.com>
44b35d71b9SYangtao LiDescription:	Shows first block address of MAIN area.
45a4db59acSJaegeuk Kim
463bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/ipu_policy
473bac380cSJaegeuk KimDate:		November 2013
483bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
49f5fa7c8bSHridya ValsarajuDescription:	Controls the in-place-update policy.
50f5fa7c8bSHridya Valsaraju		updates in f2fs. User can set:
5154a19b4dSMauro Carvalho Chehab
529e615dbbSYangtao Li		===== =============== ===================================================
539e615dbbSYangtao Li		value policy          description
549e615dbbSYangtao Li		0x00  DISABLE         disable IPU(=default option in LFS mode)
559e615dbbSYangtao Li		0x01  FORCE           all the time
569e615dbbSYangtao Li		0x02  SSR             if SSR mode is activated
57c709d099SRandy Dunlap		0x04  UTIL            if FS utilization is over threshold
589e615dbbSYangtao Li		0x08  SSR_UTIL        if SSR mode is activated and FS utilization is over
59c709d099SRandy Dunlap		                      threshold
609e615dbbSYangtao Li		0x10  FSYNC           activated in fsync path only for high performance
619e615dbbSYangtao Li		                      flash storages. IPU will be triggered only if the
629e615dbbSYangtao Li		                      # of dirty pages over min_fsync_blocks.
639e615dbbSYangtao Li		                      (=default option)
649e615dbbSYangtao Li		0x20  ASYNC           do IPU given by asynchronous write requests
659e615dbbSYangtao Li		0x40  NOCACHE         disable IPU bio cache
669e615dbbSYangtao Li		0x80  HONOR_OPU_WRITE use OPU write prior to IPU write if inode has
679e615dbbSYangtao Li		                      FI_OPU_WRITE flag
689e615dbbSYangtao Li		===== =============== ===================================================
6954a19b4dSMauro Carvalho Chehab
70f5fa7c8bSHridya Valsaraju		Refer segment.h for details.
713bac380cSJaegeuk Kim
723bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/min_ipu_util
733bac380cSJaegeuk KimDate:		November 2013
743bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
75f5fa7c8bSHridya ValsarajuDescription:	Controls the FS utilization condition for the in-place-update
76f5fa7c8bSHridya Valsaraju		policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
773bac380cSJaegeuk Kim
78c1ce1b02SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/min_fsync_blocks
79c1ce1b02SJaegeuk KimDate:		September 2014
80c1ce1b02SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
81f5fa7c8bSHridya ValsarajuDescription:	Controls the dirty page count condition for the in-place-update
82c1ce1b02SJaegeuk Kim		policies.
83c1ce1b02SJaegeuk Kim
84853137ceSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/min_seq_blocks
85853137ceSJaegeuk KimDate:		August 2018
86853137ceSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
87f5fa7c8bSHridya ValsarajuDescription:	Controls the dirty page count condition for batched sequential
88f5fa7c8bSHridya Valsaraju		writes in writepages.
89853137ceSJaegeuk Kim
90b32d73abSChao YuWhat:		/sys/fs/f2fs/<disk>/min_hot_blocks
91b32d73abSChao YuDate:		March 2017
92b32d73abSChao YuContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
93f5fa7c8bSHridya ValsarajuDescription:	Controls the dirty page count condition for redefining hot data.
94b32d73abSChao Yu
95a2a12b67SChao YuWhat:		/sys/fs/f2fs/<disk>/min_ssr_sections
96a2a12b67SChao YuDate:		October 2017
97a2a12b67SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
98f5fa7c8bSHridya ValsarajuDescription:	Controls the free section threshold to trigger SSR allocation.
99f5fa7c8bSHridya Valsaraju		If this is large, SSR mode will be enabled early.
100a2a12b67SChao Yu
1013bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_small_discards
1023bac380cSJaegeuk KimDate:		November 2013
1033bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
104f5fa7c8bSHridya ValsarajuDescription:	Controls the issue rate of discard commands that consist of small
105726865e6SChao Yu		blocks less than 2MB. The candidates to be discarded are cached during
106726865e6SChao Yu		checkpoint, and issued by issue_discard thread after checkpoint.
107726865e6SChao Yu		It is enabled by default.
1083bac380cSJaegeuk Kim
109c46867e9SYangtao LiWhat:		/sys/fs/f2fs/<disk>/max_ordered_discard
110c46867e9SYangtao LiDate:		October 2022
111c46867e9SYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
112c46867e9SYangtao LiDescription:	Controls the maximum ordered discard, the unit size is one block(4KB).
113c46867e9SYangtao Li		Set it to 16 by default.
114c46867e9SYangtao Li
115b2e4a2b3SKonstantin VyshetskyWhat:		/sys/fs/f2fs/<disk>/max_discard_request
116b2e4a2b3SKonstantin VyshetskyDate:		December 2021
117b2e4a2b3SKonstantin VyshetskyContact:	"Konstantin Vyshetsky" <vkon@google.com>
118b2e4a2b3SKonstantin VyshetskyDescription:	Controls the number of discards a thread will issue at a time.
119b2e4a2b3SKonstantin Vyshetsky		Higher number will allow the discard thread to finish its work
120c709d099SRandy Dunlap		faster, at the cost of higher latency for incoming I/O.
121b2e4a2b3SKonstantin Vyshetsky
122b2e4a2b3SKonstantin VyshetskyWhat:		/sys/fs/f2fs/<disk>/min_discard_issue_time
123b2e4a2b3SKonstantin VyshetskyDate:		December 2021
124b2e4a2b3SKonstantin VyshetskyContact:	"Konstantin Vyshetsky" <vkon@google.com>
125b2e4a2b3SKonstantin VyshetskyDescription:	Controls the interval the discard thread will wait between
126b2e4a2b3SKonstantin Vyshetsky		issuing discard requests when there are discards to be issued and
127b2e4a2b3SKonstantin Vyshetsky		no I/O aware interruptions occur.
128b2e4a2b3SKonstantin Vyshetsky
129b2e4a2b3SKonstantin VyshetskyWhat:		/sys/fs/f2fs/<disk>/mid_discard_issue_time
130b2e4a2b3SKonstantin VyshetskyDate:		December 2021
131b2e4a2b3SKonstantin VyshetskyContact:	"Konstantin Vyshetsky" <vkon@google.com>
132b2e4a2b3SKonstantin VyshetskyDescription:	Controls the interval the discard thread will wait between
133b2e4a2b3SKonstantin Vyshetsky		issuing discard requests when there are discards to be issued and
134b2e4a2b3SKonstantin Vyshetsky		an I/O aware interruption occurs.
135b2e4a2b3SKonstantin Vyshetsky
136b2e4a2b3SKonstantin VyshetskyWhat:		/sys/fs/f2fs/<disk>/max_discard_issue_time
137b2e4a2b3SKonstantin VyshetskyDate:		December 2021
138b2e4a2b3SKonstantin VyshetskyContact:	"Konstantin Vyshetsky" <vkon@google.com>
139b2e4a2b3SKonstantin VyshetskyDescription:	Controls the interval the discard thread will wait when there are
140b2e4a2b3SKonstantin Vyshetsky		no discard operations to be issued.
141b2e4a2b3SKonstantin Vyshetsky
142969d1b18SChao YuWhat:		/sys/fs/f2fs/<disk>/discard_granularity
143969d1b18SChao YuDate:		July 2017
144969d1b18SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
145f5fa7c8bSHridya ValsarajuDescription:	Controls discard granularity of inner discard thread. Inner thread
146969d1b18SChao Yu		will not issue discards with size that is smaller than granularity.
147f5fa7c8bSHridya Valsaraju		The unit size is one block(4KB), now only support configuring
148fc031877SYangtao Li		in range of [1, 512]. Default value is 16.
149fc031877SYangtao Li		For small devices, default value is 1.
150969d1b18SChao Yu
15103f2c02dSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/umount_discard_timeout
15203f2c02dSJaegeuk KimDate:		January 2019
15303f2c02dSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
154f5fa7c8bSHridya ValsarajuDescription:	Set timeout to issue discard commands during umount.
15503f2c02dSJaegeuk Kim	        Default: 5 secs
15603f2c02dSJaegeuk Kim
157ae2e2804SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/pending_discard
158ae2e2804SJaegeuk KimDate:		November 2021
159ae2e2804SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
160ae2e2804SJaegeuk KimDescription:	Shows the number of pending discard commands in the queue.
161ae2e2804SJaegeuk Kim
1623bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_victim_search
1633bac380cSJaegeuk KimDate:		January 2014
1643bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
165f5fa7c8bSHridya ValsarajuDescription:	Controls the number of trials to find a victim segment
166f5fa7c8bSHridya Valsaraju		when conducting SSR and cleaning operations. The default value
167f5fa7c8bSHridya Valsaraju		is 4096 which covers 8GB block address range.
168cdfc41c1SJaegeuk Kim
16934655575SChao YuWhat:		/sys/fs/f2fs/<disk>/migration_granularity
17034655575SChao YuDate:		October 2018
17134655575SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
172f5fa7c8bSHridya ValsarajuDescription:	Controls migration granularity of garbage collection on large
17334655575SChao Yu		section, it can let GC move partial segment{s} of one section
17434655575SChao Yu		in one GC cycle, so that dispersing heavy overhead GC to
17534655575SChao Yu		multiple lightweight one.
17634655575SChao Yu
17791796825SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/dir_level
17891796825SJaegeuk KimDate:		March 2014
17991796825SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
180f5fa7c8bSHridya ValsarajuDescription:	Controls the directory level for large directory. If a
181f5fa7c8bSHridya Valsaraju		directory has a number of files, it can reduce the file lookup
182f5fa7c8bSHridya Valsaraju		latency by increasing this dir_level value. Otherwise, it
183f5fa7c8bSHridya Valsaraju		needs to decrease this value to reduce the space overhead.
184f5fa7c8bSHridya Valsaraju		The default value is 0.
18591796825SJaegeuk Kim
186cdfc41c1SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/ram_thresh
187cdfc41c1SJaegeuk KimDate:		March 2014
188cdfc41c1SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
189f5fa7c8bSHridya ValsarajuDescription:	Controls the memory footprint used by free nids and cached
190f5fa7c8bSHridya Valsaraju		nat entries. By default, 1 is set, which indicates
191f5fa7c8bSHridya Valsaraju		10 MB / 1 GB RAM.
192bba681cbSJaegeuk Kim
19360b99b48SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/cp_interval
19460b99b48SJaegeuk KimDate:		October 2015
19560b99b48SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
196f5fa7c8bSHridya ValsarajuDescription:	Controls the checkpoint timing, set to 60 seconds by default.
197ea1a29a0SChao Yu
198d0239e1bSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/idle_interval
199d0239e1bSJaegeuk KimDate:		January 2016
200d0239e1bSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
201f5fa7c8bSHridya ValsarajuDescription:	Controls the idle timing of system, if there is no FS operation
202f5fa7c8bSHridya Valsaraju		during given interval.
203f5fa7c8bSHridya Valsaraju		Set to 5 seconds by default.
204a7d10cf3SSahitya Tummala
205a7d10cf3SSahitya TummalaWhat:		/sys/fs/f2fs/<disk>/discard_idle_interval
206a7d10cf3SSahitya TummalaDate:		September 2018
207a7d10cf3SSahitya TummalaContact:	"Chao Yu" <yuchao0@huawei.com>
2083ae768a1SJeffrey HugoContact:	"Sahitya Tummala" <quic_stummala@quicinc.com>
209f5fa7c8bSHridya ValsarajuDescription:	Controls the idle timing of discard thread given
210f5fa7c8bSHridya Valsaraju		this time interval.
211f5fa7c8bSHridya Valsaraju		Default is 5 secs.
212a7d10cf3SSahitya Tummala
213a7d10cf3SSahitya TummalaWhat:		/sys/fs/f2fs/<disk>/gc_idle_interval
214a7d10cf3SSahitya TummalaDate:		September 2018
215a7d10cf3SSahitya TummalaContact:	"Chao Yu" <yuchao0@huawei.com>
2163ae768a1SJeffrey HugoContact:	"Sahitya Tummala" <quic_stummala@quicinc.com>
217f5fa7c8bSHridya ValsarajuDescription:    Controls the idle timing for gc path. Set to 5 seconds by default.
218d0239e1bSJaegeuk Kim
219b32d73abSChao YuWhat:		/sys/fs/f2fs/<disk>/iostat_enable
220b32d73abSChao YuDate:		August 2017
221b32d73abSChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
222f5fa7c8bSHridya ValsarajuDescription:	Controls to enable/disable IO stat.
223b32d73abSChao Yu
224ea1a29a0SChao YuWhat:		/sys/fs/f2fs/<disk>/ra_nid_pages
225ea1a29a0SChao YuDate:		October 2015
226ea1a29a0SChao YuContact:	"Chao Yu" <chao2.yu@samsung.com>
227f5fa7c8bSHridya ValsarajuDescription:	Controls the count of nid pages to be readaheaded.
228f5fa7c8bSHridya Valsaraju		When building free nids, F2FS reads NAT blocks ahead for
229f5fa7c8bSHridya Valsaraju		speed up. Default is 0.
2302304cb0cSChao Yu
2312304cb0cSChao YuWhat:		/sys/fs/f2fs/<disk>/dirty_nats_ratio
2322304cb0cSChao YuDate:		January 2016
2332304cb0cSChao YuContact:	"Chao Yu" <chao2.yu@samsung.com>
234f5fa7c8bSHridya ValsarajuDescription:	Controls dirty nat entries ratio threshold, if current
2352304cb0cSChao Yu		ratio exceeds configured threshold, checkpoint will
2362304cb0cSChao Yu		be triggered for flushing dirty nat entries.
2378f1dbbbbSShuoran Liu
2388f1dbbbbSShuoran LiuWhat:		/sys/fs/f2fs/<disk>/lifetime_write_kbytes
2398f1dbbbbSShuoran LiuDate:		January 2016
2408f1dbbbbSShuoran LiuContact:	"Shuoran Liu" <liushuoran@huawei.com>
241f5fa7c8bSHridya ValsarajuDescription:	Shows total written kbytes issued to disk.
24256412894SChao Yu
2439ac19faaSEric BiggersWhat:		/sys/fs/f2fs/<disk>/features
244b32d73abSChao YuDate:		July 2017
245b32d73abSChao YuContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
246eebd36a4SJaegeuk KimDescription:	<deprecated: should use /sys/fs/f2fs/<disk>/feature_list/>
2474c89b53dSJaegeuk Kim		Shows all enabled features in current device.
2484c89b53dSJaegeuk Kim		Supported features:
2494c89b53dSJaegeuk Kim		encryption, blkzoned, extra_attr, projquota, inode_checksum,
2504c89b53dSJaegeuk Kim		flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
2514c89b53dSJaegeuk Kim		verity, sb_checksum, casefold, readonly, compression, pin_file.
2524c89b53dSJaegeuk Kim
2534c89b53dSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/feature_list/
2544c89b53dSJaegeuk KimDate:		June 2021
2554c89b53dSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
2564c89b53dSJaegeuk KimDescription:	Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule.
2574c89b53dSJaegeuk Kim		Supported on-disk features:
2584c89b53dSJaegeuk Kim		encryption, block_zoned (aka blkzoned), extra_attr,
2594c89b53dSJaegeuk Kim		project_quota (aka projquota), inode_checksum,
2604c89b53dSJaegeuk Kim		flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
2614c89b53dSJaegeuk Kim		verity, sb_checksum, casefold, readonly, compression.
2624c89b53dSJaegeuk Kim		Note that, pin_file is moved into /sys/fs/f2fs/features/.
2634c89b53dSJaegeuk Kim
2644c89b53dSJaegeuk KimWhat:		/sys/fs/f2fs/features/
2654c89b53dSJaegeuk KimDate:		July 2017
2664c89b53dSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
2674c89b53dSJaegeuk KimDescription:	Shows all enabled kernel features.
2684c89b53dSJaegeuk Kim		Supported features:
2694c89b53dSJaegeuk Kim		encryption, block_zoned, extra_attr, project_quota,
2704c89b53dSJaegeuk Kim		inode_checksum, flexible_inline_xattr, quota_ino,
2714c89b53dSJaegeuk Kim		inode_crtime, lost_found, verity, sb_checksum,
2724c89b53dSJaegeuk Kim		casefold, readonly, compression, test_dummy_encryption_v2,
2734c89b53dSJaegeuk Kim		atomic_write, pin_file, encrypted_casefold.
274b32d73abSChao Yu
27556412894SChao YuWhat:		/sys/fs/f2fs/<disk>/inject_rate
27656412894SChao YuDate:		May 2016
27756412894SChao YuContact:	"Sheng Yong" <shengyong1@huawei.com>
278f5fa7c8bSHridya ValsarajuDescription:	Controls the injection rate of arbitrary faults.
27956412894SChao Yu
28056412894SChao YuWhat:		/sys/fs/f2fs/<disk>/inject_type
28156412894SChao YuDate:		May 2016
28256412894SChao YuContact:	"Sheng Yong" <shengyong1@huawei.com>
283f5fa7c8bSHridya ValsarajuDescription:	Controls the injection type of arbitrary faults.
284f5fa7c8bSHridya Valsaraju
285f5fa7c8bSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/dirty_segments
286f5fa7c8bSHridya ValsarajuDate:		October 2017
287f5fa7c8bSHridya ValsarajuContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
288f5fa7c8bSHridya ValsarajuDescription:	Shows the number of dirty segments.
289daeb433eSChao Yu
290daeb433eSChao YuWhat:		/sys/fs/f2fs/<disk>/reserved_blocks
291daeb433eSChao YuDate:		June 2017
292daeb433eSChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
293f5fa7c8bSHridya ValsarajuDescription:	Controls target reserved blocks in system, the threshold
29480d42145SYunlong Song		is soft, it could exceed current available user space.
29580d42145SYunlong Song
29680d42145SYunlong SongWhat:		/sys/fs/f2fs/<disk>/current_reserved_blocks
29780d42145SYunlong SongDate:		October 2017
29880d42145SYunlong SongContact:	"Yunlong Song" <yunlong.song@huawei.com>
29980d42145SYunlong SongContact:	"Chao Yu" <yuchao0@huawei.com>
300f5fa7c8bSHridya ValsarajuDescription:	Shows current reserved blocks in system, it may be temporarily
30180d42145SYunlong Song		smaller than target_reserved_blocks, but will gradually
30280d42145SYunlong Song		increase to target_reserved_blocks when more free blocks are
30380d42145SYunlong Song		freed by user later.
304d9872a69SJaegeuk Kim
305d9872a69SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/gc_urgent
306d9872a69SJaegeuk KimDate:		August 2017
307d9872a69SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
308d98af5f4SDaeho JeongDescription:	Do background GC aggressively when set. Set to 0 by default.
309d98af5f4SDaeho Jeong		gc urgent high(1): does GC forcibly in a period of given
310d98af5f4SDaeho Jeong		gc_urgent_sleep_time and ignores I/O idling check. uses greedy
311d98af5f4SDaeho Jeong		GC approach and turns SSR mode on.
312d98af5f4SDaeho Jeong		gc urgent low(2): lowers the bar of checking I/O idling in
313d98af5f4SDaeho Jeong		order to process outstanding discard commands and GC a
314296b8cb3SZhiguo Niu		little bit aggressively. always uses cost benefit GC approach,
315296b8cb3SZhiguo Niu		and will override age-threshold GC approach if ATGC is enabled
316296b8cb3SZhiguo Niu		at the same time.
317d98af5f4SDaeho Jeong		gc urgent mid(3): does GC forcibly in a period of given
318d98af5f4SDaeho Jeong		gc_urgent_sleep_time and executes a mid level of I/O idling check.
319296b8cb3SZhiguo Niu		always uses cost benefit GC approach, and will override
320296b8cb3SZhiguo Niu		age-threshold GC approach if ATGC is enabled at the same time.
321d9872a69SJaegeuk Kim
322d9872a69SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/gc_urgent_sleep_time
323d9872a69SJaegeuk KimDate:		August 2017
324d9872a69SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
325f5fa7c8bSHridya ValsarajuDescription:	Controls sleep time of GC urgent mode. Set to 500ms by default.
326f6df8f23SSheng Yong
327f6df8f23SSheng YongWhat:		/sys/fs/f2fs/<disk>/readdir_ra
328f6df8f23SSheng YongDate:		November 2017
329f6df8f23SSheng YongContact:	"Sheng Yong" <shengyong1@huawei.com>
330f5fa7c8bSHridya ValsarajuDescription:	Controls readahead inode block in readdir. Enabled by default.
331f5fa7c8bSHridya Valsaraju
332f5fa7c8bSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/gc_pin_file_thresh
333f5fa7c8bSHridya ValsarajuDate:		January 2018
334f5fa7c8bSHridya ValsarajuContact:	Jaegeuk Kim <jaegeuk@kernel.org>
335f5fa7c8bSHridya ValsarajuDescription:	This indicates how many GC can be failed for the pinned
336f5fa7c8bSHridya Valsaraju		file. If it exceeds this, F2FS doesn't guarantee its pinning
337c521a6abSChao Yu		state. 2048 trials is set by default, and 65535 as maximum.
338846ae671SChao Yu
339846ae671SChao YuWhat:		/sys/fs/f2fs/<disk>/extension_list
340c709d099SRandy DunlapDate:		February 2018
341846ae671SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
342f5fa7c8bSHridya ValsarajuDescription:	Used to control configure extension list:
343846ae671SChao Yu		- Query: cat /sys/fs/f2fs/<disk>/extension_list
344b6a06cbbSChao Yu		- Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
345b6a06cbbSChao Yu		- Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
346b6a06cbbSChao Yu		- [h] means add/del hot file extension
347b6a06cbbSChao Yu		- [c] means add/del cold file extension
3484d3aed70SDaniel Rosenberg
3494d3aed70SDaniel RosenbergWhat:		/sys/fs/f2fs/<disk>/unusable
3504d3aed70SDaniel RosenbergDate		April 2019
3514d3aed70SDaniel RosenbergContact:	"Daniel Rosenberg" <drosen@google.com>
352f5fa7c8bSHridya ValsarajuDescription:	If checkpoint=disable, it displays the number of blocks that
353f5fa7c8bSHridya Valsaraju		are unusable.
354c67c8c0fSxuyehan		If checkpoint=enable it displays the number of blocks that
355f5fa7c8bSHridya Valsaraju		would be unusable if checkpoint=disable were to be set.
3565aba5430SDaniel Rosenberg
3575aba5430SDaniel RosenbergWhat:		/sys/fs/f2fs/<disk>/encoding
3585aba5430SDaniel RosenbergDate		July 2019
3595aba5430SDaniel RosenbergContact:	"Daniel Rosenberg" <drosen@google.com>
360f5fa7c8bSHridya ValsarajuDescription:	Displays name and version of the encoding set for the filesystem.
3615aba5430SDaniel Rosenberg		If no encoding is set, displays (none)
362fc7100eaSHridya Valsaraju
363fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/free_segments
364fc7100eaSHridya ValsarajuDate:		September 2019
365fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
366fc7100eaSHridya ValsarajuDescription:	Number of free segments in disk.
367fc7100eaSHridya Valsaraju
368fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/cp_foreground_calls
369fc7100eaSHridya ValsarajuDate:		September 2019
370fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
371fc7100eaSHridya ValsarajuDescription:	Number of checkpoint operations performed on demand. Available when
372fc7100eaSHridya Valsaraju		CONFIG_F2FS_STAT_FS=y.
373fc7100eaSHridya Valsaraju
374fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/cp_background_calls
375fc7100eaSHridya ValsarajuDate:		September 2019
376fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
377fc7100eaSHridya ValsarajuDescription:	Number of checkpoint operations performed in the background to
378fc7100eaSHridya Valsaraju		free segments. Available when CONFIG_F2FS_STAT_FS=y.
379fc7100eaSHridya Valsaraju
380fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/gc_foreground_calls
381fc7100eaSHridya ValsarajuDate:		September 2019
382fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
383fc7100eaSHridya ValsarajuDescription:	Number of garbage collection operations performed on demand.
384fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
385fc7100eaSHridya Valsaraju
386fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/gc_background_calls
387fc7100eaSHridya ValsarajuDate:		September 2019
388fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
389fc7100eaSHridya ValsarajuDescription:	Number of garbage collection operations triggered in background.
390fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
391fc7100eaSHridya Valsaraju
392fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/moved_blocks_foreground
393fc7100eaSHridya ValsarajuDate:		September 2019
394fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
395fc7100eaSHridya ValsarajuDescription:	Number of blocks moved by garbage collection in foreground.
396fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
397fc7100eaSHridya Valsaraju
398fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/moved_blocks_background
399fc7100eaSHridya ValsarajuDate:		September 2019
400fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
401fc7100eaSHridya ValsarajuDescription:	Number of blocks moved by garbage collection in background.
402fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
403fc7100eaSHridya Valsaraju
404fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/avg_vblocks
405fc7100eaSHridya ValsarajuDate:		September 2019
406fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
407fc7100eaSHridya ValsarajuDescription:	Average number of valid blocks.
408fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
409a7e679b5SJaegeuk Kim
410a7e679b5SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/mounted_time_sec
411a7e679b5SJaegeuk KimDate:		February 2020
412a7e679b5SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
413a7e679b5SJaegeuk KimDescription:	Show the mounted time in secs of this partition.
414da9953b7SJaegeuk Kim
415da9953b7SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/data_io_flag
416da9953b7SJaegeuk KimDate:		April 2020
417da9953b7SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
418da9953b7SJaegeuk KimDescription:	Give a way to attach REQ_META|FUA to data writes
419da9953b7SJaegeuk Kim		given temperature-based bits. Now the bits indicate:
42054a19b4dSMauro Carvalho Chehab
42154a19b4dSMauro Carvalho Chehab		+-------------------+-------------------+
42254a19b4dSMauro Carvalho Chehab		|      REQ_META     |      REQ_FUA      |
42354a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
42454a19b4dSMauro Carvalho Chehab		|    5 |    4 |   3 |    2 |    1 |   0 |
42554a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
42654a19b4dSMauro Carvalho Chehab		| Cold | Warm | Hot | Cold | Warm | Hot |
42754a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
4282bc4bea3SDaeho Jeong
42932b6aba8SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/node_io_flag
43032b6aba8SJaegeuk KimDate:		June 2020
43132b6aba8SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
43232b6aba8SJaegeuk KimDescription:	Give a way to attach REQ_META|FUA to node writes
43332b6aba8SJaegeuk Kim		given temperature-based bits. Now the bits indicate:
43454a19b4dSMauro Carvalho Chehab
43554a19b4dSMauro Carvalho Chehab		+-------------------+-------------------+
43654a19b4dSMauro Carvalho Chehab		|      REQ_META     |      REQ_FUA      |
43754a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
43854a19b4dSMauro Carvalho Chehab		|    5 |    4 |   3 |    2 |    1 |   0 |
43954a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
44054a19b4dSMauro Carvalho Chehab		| Cold | Warm | Hot | Cold | Warm | Hot |
44154a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
44232b6aba8SJaegeuk Kim
4432bc4bea3SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/iostat_period_ms
4442bc4bea3SDaeho JeongDate:		April 2020
4452bc4bea3SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
4462bc4bea3SDaeho JeongDescription:	Give a way to change iostat_period time. 3secs by default.
4472bc4bea3SDaeho Jeong		The new iostat trace gives stats gap given the period.
44810208567SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_io_bytes
44910208567SJaegeuk KimDate:		December 2020
45010208567SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
45110208567SJaegeuk KimDescription:	This gives a control to limit the bio size in f2fs.
45210208567SJaegeuk Kim		Default is zero, which will follow underlying block layer limit,
45310208567SJaegeuk Kim		whereas, if it has a certain bytes value, f2fs won't submit a
45410208567SJaegeuk Kim		bio larger than that size.
4550bfe9f79SChao Yu
4560bfe9f79SChao YuWhat:		/sys/fs/f2fs/<disk>/stat/sb_status
4570bfe9f79SChao YuDate:		December 2020
4580bfe9f79SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
4590bfe9f79SChao YuDescription:	Show status of f2fs superblock in real time.
4600bfe9f79SChao Yu
4610bfe9f79SChao Yu		====== ===================== =================================
4620bfe9f79SChao Yu		value  sb status macro       description
4630bfe9f79SChao Yu		0x1    SBI_IS_DIRTY          dirty flag for checkpoint
4640bfe9f79SChao Yu		0x2    SBI_IS_CLOSE          specify unmounting
4650bfe9f79SChao Yu		0x4    SBI_NEED_FSCK         need fsck.f2fs to fix
4660bfe9f79SChao Yu		0x8    SBI_POR_DOING         recovery is doing or not
4670bfe9f79SChao Yu		0x10   SBI_NEED_SB_WRITE     need to recover superblock
4680bfe9f79SChao Yu		0x20   SBI_NEED_CP           need to checkpoint
4690bfe9f79SChao Yu		0x40   SBI_IS_SHUTDOWN       shutdown by ioctl
4700bfe9f79SChao Yu		0x80   SBI_IS_RECOVERED      recovered orphan/data
4710bfe9f79SChao Yu		0x100  SBI_CP_DISABLED       CP was disabled last mount
4720bfe9f79SChao Yu		0x200  SBI_CP_DISABLED_QUICK CP was disabled quickly
4730bfe9f79SChao Yu		0x400  SBI_QUOTA_NEED_FLUSH  need to flush quota info in CP
4740bfe9f79SChao Yu		0x800  SBI_QUOTA_SKIP_FLUSH  skip flushing quota in current CP
4750bfe9f79SChao Yu		0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
4760bfe9f79SChao Yu		0x2000 SBI_IS_RESIZEFS       resizefs is in process
477ba900534SJaegeuk Kim		0x4000 SBI_IS_FREEZING       freefs is in process
4780bfe9f79SChao Yu		====== ===================== =================================
479e6592066SDaeho Jeong
480718693c8SChao YuWhat:		/sys/fs/f2fs/<disk>/stat/cp_status
481718693c8SChao YuDate:		September 2022
482718693c8SChao YuContact:	"Chao Yu" <chao.yu@oppo.com>
483718693c8SChao YuDescription:	Show status of f2fs checkpoint in real time.
484718693c8SChao Yu
485718693c8SChao Yu		=============================== ==============================
486718693c8SChao Yu		cp flag				value
487718693c8SChao Yu		CP_UMOUNT_FLAG			0x00000001
488718693c8SChao Yu		CP_ORPHAN_PRESENT_FLAG		0x00000002
489718693c8SChao Yu		CP_COMPACT_SUM_FLAG		0x00000004
490718693c8SChao Yu		CP_ERROR_FLAG			0x00000008
491718693c8SChao Yu		CP_FSCK_FLAG			0x00000010
492718693c8SChao Yu		CP_FASTBOOT_FLAG		0x00000020
493718693c8SChao Yu		CP_CRC_RECOVERY_FLAG		0x00000040
494718693c8SChao Yu		CP_NAT_BITS_FLAG		0x00000080
495718693c8SChao Yu		CP_TRIMMED_FLAG			0x00000100
496718693c8SChao Yu		CP_NOCRC_RECOVERY_FLAG		0x00000200
497718693c8SChao Yu		CP_LARGE_NAT_BITMAP_FLAG	0x00000400
498718693c8SChao Yu		CP_QUOTA_NEED_FSCK_FLAG		0x00000800
499718693c8SChao Yu		CP_DISABLED_FLAG		0x00001000
500718693c8SChao Yu		CP_DISABLED_QUICK_FLAG		0x00002000
501718693c8SChao Yu		CP_RESIZEFS_FLAG		0x00004000
502718693c8SChao Yu		=============================== ==============================
503718693c8SChao Yu
504c3c2d45bSZhiguo NiuWhat:		/sys/fs/f2fs/<disk>/stat/issued_discard
505c3c2d45bSZhiguo NiuDate:		December 2023
506c3c2d45bSZhiguo NiuContact:	"Zhiguo Niu" <zhiguo.niu@unisoc.com>
507c3c2d45bSZhiguo NiuDescription:	Shows the number of issued discard.
508c3c2d45bSZhiguo Niu
509c3c2d45bSZhiguo NiuWhat:		/sys/fs/f2fs/<disk>/stat/queued_discard
510c3c2d45bSZhiguo NiuDate:		December 2023
511c3c2d45bSZhiguo NiuContact:	"Zhiguo Niu" <zhiguo.niu@unisoc.com>
512c3c2d45bSZhiguo NiuDescription:	Shows the number of queued discard.
513c3c2d45bSZhiguo Niu
514c3c2d45bSZhiguo NiuWhat:		/sys/fs/f2fs/<disk>/stat/undiscard_blks
515c3c2d45bSZhiguo NiuDate:		December 2023
516c3c2d45bSZhiguo NiuContact:	"Zhiguo Niu" <zhiguo.niu@unisoc.com>
517c3c2d45bSZhiguo NiuDescription:	Shows the total number of undiscard blocks.
518c3c2d45bSZhiguo Niu
519e6592066SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/ckpt_thread_ioprio
520e6592066SDaeho JeongDate:		January 2021
521e6592066SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
522e6592066SDaeho JeongDescription:	Give a way to change checkpoint merge daemon's io priority.
523e6592066SDaeho Jeong		Its default value is "be,3", which means "BE" I/O class and
524e6592066SDaeho Jeong		I/O priority "3". We can select the class between "rt" and "be",
525e6592066SDaeho Jeong		and set the I/O priority within valid range of it. "," delimiter
526e6592066SDaeho Jeong		is necessary in between I/O class and priority number.
52708234279SJaegeuk Kim
52808234279SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/ovp_segments
52908234279SJaegeuk KimDate:		March 2021
53008234279SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
53108234279SJaegeuk KimDescription:	Shows the number of overprovision segments.
5325ac443e2SDaeho Jeong
5335ac443e2SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/compr_written_block
5345ac443e2SDaeho JeongDate:		March 2021
5355ac443e2SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
5365ac443e2SDaeho JeongDescription:	Show the block count written after compression since mount. Note
5375ac443e2SDaeho Jeong		that when the compressed blocks are deleted, this count doesn't
5385ac443e2SDaeho Jeong		decrease. If you write "0" here, you can initialize
5395ac443e2SDaeho Jeong		compr_written_block and compr_saved_block to "0".
5405ac443e2SDaeho Jeong
5415ac443e2SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/compr_saved_block
5425ac443e2SDaeho JeongDate:		March 2021
5435ac443e2SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
5445ac443e2SDaeho JeongDescription:	Show the saved block count with compression since mount. Note
5455ac443e2SDaeho Jeong		that when the compressed blocks are deleted, this count doesn't
5465ac443e2SDaeho Jeong		decrease. If you write "0" here, you can initialize
5475ac443e2SDaeho Jeong		compr_written_block and compr_saved_block to "0".
5485ac443e2SDaeho Jeong
5495ac443e2SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/compr_new_inode
5505ac443e2SDaeho JeongDate:		March 2021
5515ac443e2SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
5525ac443e2SDaeho JeongDescription:	Show the count of inode newly enabled for compression since mount.
5535ac443e2SDaeho Jeong		Note that when the compression is disabled for the files, this count
5545ac443e2SDaeho Jeong		doesn't decrease. If you write "0" here, you can initialize
5555ac443e2SDaeho Jeong		compr_new_inode to "0".
5568939a848SChao Yu
5578939a848SChao YuWhat:		/sys/fs/f2fs/<disk>/atgc_candidate_ratio
5588939a848SChao YuDate:		May 2021
5598939a848SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
5608939a848SChao YuDescription:	When ATGC is on, it controls candidate ratio in order to limit total
5618939a848SChao Yu		number of potential victim in all candidates, the value should be in
5628939a848SChao Yu		range of [0, 100], by default it was initialized as 20(%).
5638939a848SChao Yu
5648939a848SChao YuWhat:		/sys/fs/f2fs/<disk>/atgc_candidate_count
5658939a848SChao YuDate:		May 2021
5668939a848SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
5678939a848SChao YuDescription:	When ATGC is on, it controls candidate count in order to limit total
5688939a848SChao Yu		number of potential victim in all candidates, by default it was
5698939a848SChao Yu		initialized as 10 (sections).
5708939a848SChao Yu
5718939a848SChao YuWhat:		/sys/fs/f2fs/<disk>/atgc_age_weight
5728939a848SChao YuDate:		May 2021
5738939a848SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
5748939a848SChao YuDescription:	When ATGC is on, it controls age weight to balance weight proportion
5758939a848SChao Yu		in between aging and valid blocks, the value should be in range of
5768939a848SChao Yu		[0, 100], by default it was initialized as 60(%).
5778939a848SChao Yu
5788939a848SChao YuWhat:		/sys/fs/f2fs/<disk>/atgc_age_threshold
5798939a848SChao YuDate:		May 2021
5808939a848SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
5818939a848SChao YuDescription:	When ATGC is on, it controls age threshold to bypass GCing young
5828939a848SChao Yu		candidates whose age is not beyond the threshold, by default it was
5838939a848SChao Yu		initialized as 604800 seconds (equals to 7 days).
58407c6b593SDaeho Jeong
5856f092b55Sliujinbao1What:		/sys/fs/f2fs/<disk>/atgc_enabled
5866f092b55Sliujinbao1Date:		Feb 2024
5876f092b55Sliujinbao1Contact:	"Jinbao Liu" <liujinbao1@xiaomi.com>
5886f092b55Sliujinbao1Description:	It represents whether ATGC is on or off. The value is 1 which
5896f092b55Sliujinbao1               indicates that ATGC is on, and 0 indicates that it is off.
5906f092b55Sliujinbao1
59107c6b593SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/gc_reclaimed_segments
59207c6b593SDaeho JeongDate:		July 2021
59307c6b593SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
59407c6b593SDaeho JeongDescription:	Show how many segments have been reclaimed by GC during a specific
59507c6b593SDaeho Jeong		GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy,
596d98af5f4SDaeho Jeong		3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid)
59707c6b593SDaeho Jeong		You can re-initialize this value to "0".
59807c6b593SDaeho Jeong
59907c6b593SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/gc_segment_mode
60007c6b593SDaeho JeongDate:		July 2021
60107c6b593SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
60207c6b593SDaeho JeongDescription:	You can control for which gc mode the "gc_reclaimed_segments" node shows.
60307c6b593SDaeho Jeong		Refer to the description of the modes in "gc_reclaimed_segments".
6040f6b56ecSDaeho Jeong
6050f6b56ecSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/seq_file_ra_mul
6060f6b56ecSDaeho JeongDate:		July 2021
6070f6b56ecSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
6080f6b56ecSDaeho JeongDescription:	You can	control the multiplier value of	bdi device readahead window size
6090f6b56ecSDaeho Jeong		between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option.
6106691d940SDaeho Jeong
6116691d940SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/max_fragment_chunk
6126691d940SDaeho JeongDate:		August 2021
6136691d940SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
6146691d940SDaeho JeongDescription:	With "mode=fragment:block" mount options, we can scatter block allocation.
6156691d940SDaeho Jeong		f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
6166691d940SDaeho Jeong		in the length of 1..<max_fragment_hole> by turns. This value can be set
6176691d940SDaeho Jeong		between 1..512 and the default value is 4.
6186691d940SDaeho Jeong
6196691d940SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/max_fragment_hole
6206691d940SDaeho JeongDate:		August 2021
6216691d940SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
6226691d940SDaeho JeongDescription:	With "mode=fragment:block" mount options, we can scatter block allocation.
6236691d940SDaeho Jeong		f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
6246691d940SDaeho Jeong		in the length of 1..<max_fragment_hole> by turns. This value can be set
6256691d940SDaeho Jeong		between 1..512 and the default value is 4.
626325163e9SDaeho Jeong
627e5a0db6aSYangtao LiWhat:		/sys/fs/f2fs/<disk>/gc_remaining_trials
628e5a0db6aSYangtao LiDate:		October 2022
629e5a0db6aSYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
630e5a0db6aSYangtao LiDescription:	You can set the trial count limit for GC urgent and idle mode with this value.
631325163e9SDaeho Jeong		If GC thread gets to the limit, the mode will turn back to GC normal mode.
632325163e9SDaeho Jeong		By default, the value is zero, which means there is no limit like before.
63347c8ebccSJaegeuk Kim
63447c8ebccSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_roll_forward_node_blocks
63547c8ebccSJaegeuk KimDate:		January 2022
63647c8ebccSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
63747c8ebccSJaegeuk KimDescription:	Controls max # of node block writes to be used for roll forward
63847c8ebccSJaegeuk Kim		recovery. This can limit the roll forward recovery time.
6398e0f54a7SJaegeuk Kim
6408e0f54a7SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/unusable_blocks_per_sec
6418e0f54a7SJaegeuk KimDate:		June 2022
6428e0f54a7SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
6438e0f54a7SJaegeuk KimDescription:	Shows the number of unusable blocks in a section which was defined by
6448e0f54a7SJaegeuk Kim		the zone capacity reported by underlying zoned device.
645f8e2f32bSDaeho Jeong
646f8e2f32bSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/current_atomic_write
647f8e2f32bSDaeho JeongDate:		July 2022
648f8e2f32bSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
649f8e2f32bSDaeho JeongDescription:	Show the total current atomic write block count, which is not committed yet.
650f8e2f32bSDaeho Jeong		This is a read-only entry.
651f8e2f32bSDaeho Jeong
652f8e2f32bSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/peak_atomic_write
653f8e2f32bSDaeho JeongDate:		July 2022
654f8e2f32bSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
655f8e2f32bSDaeho JeongDescription:	Show the peak value of total current atomic write block count after boot.
656f8e2f32bSDaeho Jeong		If you write "0" here, you can initialize to "0".
657f8e2f32bSDaeho Jeong
658f8e2f32bSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/committed_atomic_block
659f8e2f32bSDaeho JeongDate:		July 2022
660f8e2f32bSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
661f8e2f32bSDaeho JeongDescription:	Show the accumulated total committed atomic write block count after boot.
662f8e2f32bSDaeho Jeong		If you write "0" here, you can initialize to "0".
663f8e2f32bSDaeho Jeong
664f8e2f32bSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/revoked_atomic_block
665f8e2f32bSDaeho JeongDate:		July 2022
666f8e2f32bSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
667f8e2f32bSDaeho JeongDescription:	Show the accumulated total revoked atomic write block count after boot.
668f8e2f32bSDaeho Jeong		If you write "0" here, you can initialize to "0".
669a3951cd1SYangtao Li
670a3951cd1SYangtao LiWhat:		/sys/fs/f2fs/<disk>/gc_mode
671a3951cd1SYangtao LiDate:		October 2022
672a3951cd1SYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
673a3951cd1SYangtao LiDescription:	Show the current gc_mode as a string.
674a3951cd1SYangtao Li		This is a read-only entry.
6758a47d228SYangtao Li
6768a47d228SYangtao LiWhat:		/sys/fs/f2fs/<disk>/discard_urgent_util
6778a47d228SYangtao LiDate:		November 2022
6788a47d228SYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
6798a47d228SYangtao LiDescription:	When space utilization exceeds this, do background DISCARD aggressively.
6808a47d228SYangtao Li		Does DISCARD forcibly in a period of given min_discard_issue_time when the number
6818a47d228SYangtao Li		of discards is not 0 and set discard granularity to 1.
6828a47d228SYangtao Li		Default: 80
68371644dffSJaegeuk Kim
68471644dffSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/hot_data_age_threshold
68571644dffSJaegeuk KimDate:		November 2022
68671644dffSJaegeuk KimContact:	"Ping Xiong" <xiongping1@xiaomi.com>
68771644dffSJaegeuk KimDescription:	When DATA SEPARATION is on, it controls the age threshold to indicate
68871644dffSJaegeuk Kim		the data blocks as hot. By default it was initialized as 262144 blocks
68971644dffSJaegeuk Kim		(equals to 1GB).
69071644dffSJaegeuk Kim
69171644dffSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/warm_data_age_threshold
69271644dffSJaegeuk KimDate:		November 2022
69371644dffSJaegeuk KimContact:	"Ping Xiong" <xiongping1@xiaomi.com>
69471644dffSJaegeuk KimDescription:	When DATA SEPARATION is on, it controls the age threshold to indicate
69571644dffSJaegeuk Kim		the data blocks as warm. By default it was initialized as 2621440 blocks
69671644dffSJaegeuk Kim		(equals to 10GB).
697cec32b00SChao Yu
698cec32b00SChao YuWhat:		/sys/fs/f2fs/<disk>/fault_rate
699cec32b00SChao YuDate:		May 2016
700cec32b00SChao YuContact:	"Sheng Yong" <shengyong@oppo.com>
701cec32b00SChao YuContact:	"Chao Yu" <chao@kernel.org>
702cec32b00SChao YuDescription:	Enable fault injection in all supported types with
703cec32b00SChao Yu		specified injection rate.
704cec32b00SChao Yu
705cec32b00SChao YuWhat:		/sys/fs/f2fs/<disk>/fault_type
706cec32b00SChao YuDate:		May 2016
707cec32b00SChao YuContact:	"Sheng Yong" <shengyong@oppo.com>
708cec32b00SChao YuContact:	"Chao Yu" <chao@kernel.org>
709cec32b00SChao YuDescription:	Support configuring fault injection type, should be
710cec32b00SChao Yu		enabled with fault_injection option, fault type value
711cec32b00SChao Yu		is shown below, it supports single or combined type.
712cec32b00SChao Yu
713c7115e09SChao Yu		===========================      ===========
714cec32b00SChao Yu		Type_Name                        Type_Value
715c7115e09SChao Yu		===========================      ===========
716cec32b00SChao Yu		FAULT_KMALLOC                    0x000000001
717cec32b00SChao Yu		FAULT_KVMALLOC                   0x000000002
718cec32b00SChao Yu		FAULT_PAGE_ALLOC                 0x000000004
719cec32b00SChao Yu		FAULT_PAGE_GET                   0x000000008
720cec32b00SChao Yu		FAULT_ALLOC_BIO                  0x000000010 (obsolete)
721cec32b00SChao Yu		FAULT_ALLOC_NID                  0x000000020
722cec32b00SChao Yu		FAULT_ORPHAN                     0x000000040
723cec32b00SChao Yu		FAULT_BLOCK                      0x000000080
724cec32b00SChao Yu		FAULT_DIR_DEPTH                  0x000000100
725cec32b00SChao Yu		FAULT_EVICT_INODE                0x000000200
726cec32b00SChao Yu		FAULT_TRUNCATE                   0x000000400
727cec32b00SChao Yu		FAULT_READ_IO                    0x000000800
728cec32b00SChao Yu		FAULT_CHECKPOINT                 0x000001000
729cec32b00SChao Yu		FAULT_DISCARD                    0x000002000
730cec32b00SChao Yu		FAULT_WRITE_IO                   0x000004000
731cec32b00SChao Yu		FAULT_SLAB_ALLOC                 0x000008000
732cec32b00SChao Yu		FAULT_DQUOT_INIT                 0x000010000
733cec32b00SChao Yu		FAULT_LOCK_OP                    0x000020000
734c7115e09SChao Yu		FAULT_BLKADDR_VALIDITY           0x000040000
735c7115e09SChao Yu		FAULT_BLKADDR_CONSISTENCE        0x000080000
7368b10d365SChao Yu		FAULT_NO_SEGMENT                 0x000100000
737c7115e09SChao Yu		===========================      ===========
738120e0ea1SYangtao Li
739120e0ea1SYangtao LiWhat:		/sys/fs/f2fs/<disk>/discard_io_aware_gran
740120e0ea1SYangtao LiDate:		January 2023
741120e0ea1SYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
742120e0ea1SYangtao LiDescription:	Controls background discard granularity of inner discard thread
743120e0ea1SYangtao Li		when is not in idle. Inner thread will not issue discards with size that
744120e0ea1SYangtao Li		is smaller than granularity. The unit size is one block(4KB), now only
745120e0ea1SYangtao Li		support configuring in range of [0, 512].
746120e0ea1SYangtao Li		Default: 512
747d23be468Sqixiaoyu1
748d23be468Sqixiaoyu1What:		/sys/fs/f2fs/<disk>/last_age_weight
749d23be468Sqixiaoyu1Date:		January 2023
750d23be468Sqixiaoyu1Contact:	"Ping Xiong" <xiongping1@xiaomi.com>
751d23be468Sqixiaoyu1Description:	When DATA SEPARATION is on, it controls the weight of last data block age.
752960fa2c8SYangtao Li
753960fa2c8SYangtao LiWhat:		/sys/fs/f2fs/<disk>/compress_watermark
754960fa2c8SYangtao LiDate:		February 2023
755960fa2c8SYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
756960fa2c8SYangtao LiDescription:	When compress cache is on, it controls free memory watermark
757960fa2c8SYangtao Li		in order to limit caching compress page. If free memory is lower
758960fa2c8SYangtao Li		than watermark, then deny caching compress page. The value should be in
759960fa2c8SYangtao Li		range of (0, 100], by default it was initialized as 20(%).
760960fa2c8SYangtao Li
761960fa2c8SYangtao LiWhat:		/sys/fs/f2fs/<disk>/compress_percent
762960fa2c8SYangtao LiDate:		February 2023
763960fa2c8SYangtao LiContact:	"Yangtao Li" <frank.li@vivo.com>
764960fa2c8SYangtao LiDescription:	When compress cache is on, it controls cached page
765960fa2c8SYangtao Li		percent(compress pages / free_ram) in order to limit caching compress page.
766960fa2c8SYangtao Li		If cached page percent exceed threshold, then deny caching compress page.
767960fa2c8SYangtao Li		The value should be in range of (0, 100], by default it was initialized
768960fa2c8SYangtao Li		as 20(%).
769d346fa09SChao Yu
770d346fa09SChao YuWhat:		/sys/fs/f2fs/<disk>/discard_io_aware
771d346fa09SChao YuDate:		November 2023
772d346fa09SChao YuContact:	"Chao Yu" <chao@kernel.org>
773d346fa09SChao YuDescription:	It controls to enable/disable IO aware feature for background discard.
774d346fa09SChao Yu		By default, the value is 1 which indicates IO aware is on.
7758444ce52SLiao Yuanhong
7768444ce52SLiao YuanhongWhat:		/sys/fs/f2fs/<disk>/blkzone_alloc_policy
7778444ce52SLiao YuanhongDate:		July 2024
7788444ce52SLiao YuanhongContact:	"Yuanhong Liao" <liaoyuanhong@vivo.com>
7798444ce52SLiao YuanhongDescription:	The zone UFS we are currently using consists of two parts:
7808444ce52SLiao Yuanhong		conventional zones and sequential zones. It can be used to control which part
7818444ce52SLiao Yuanhong		to prioritize for writes, with a default value of 0.
7828444ce52SLiao Yuanhong
7838444ce52SLiao Yuanhong		========================  =========================================
7848444ce52SLiao Yuanhong		value					  description
7858444ce52SLiao Yuanhong		blkzone_alloc_policy = 0  Prioritize writing to sequential zones
7868444ce52SLiao Yuanhong		blkzone_alloc_policy = 1  Only allow writing to sequential zones
7878444ce52SLiao Yuanhong		blkzone_alloc_policy = 2  Prioritize writing to conventional zones
7888444ce52SLiao Yuanhong		========================  =========================================
7898c890c4cSDaeho Jeong
7908c890c4cSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/migration_window_granularity
7918c890c4cSDaeho JeongDate:		September 2024
7928c890c4cSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
7938c890c4cSDaeho JeongDescription:	Controls migration window granularity of garbage collection on large
7948c890c4cSDaeho Jeong		section. it can control the scanning window granularity for GC migration
7958c890c4cSDaeho Jeong		in a unit of segment, while migration_granularity controls the number
7968c890c4cSDaeho Jeong		of segments which can be migrated at the same turn.
7974cdca5a9SDaeho Jeong
7984cdca5a9SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/reserved_segments
7994cdca5a9SDaeho JeongDate:		September 2024
8004cdca5a9SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
8014cdca5a9SDaeho JeongDescription:	In order to fine tune GC behavior, we can control the number of
8024cdca5a9SDaeho Jeong		reserved segments.
8039a481a1cSDaeho Jeong
8049a481a1cSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/gc_no_zoned_gc_percent
8059a481a1cSDaeho JeongDate:		September 2024
8069a481a1cSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
8079a481a1cSDaeho JeongDescription:	If the percentage of free sections over total sections is above this
8089a481a1cSDaeho Jeong		number, F2FS do not garbage collection for zoned devices through the
8099a481a1cSDaeho Jeong		background GC thread. the default number is "60".
8109a481a1cSDaeho Jeong
8119a481a1cSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/gc_boost_zoned_gc_percent
8129a481a1cSDaeho JeongDate:		September 2024
8139a481a1cSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
8149a481a1cSDaeho JeongDescription:	If the percentage of free sections over total sections is under this
8159a481a1cSDaeho Jeong		number, F2FS boosts garbage collection for zoned devices through the
8169a481a1cSDaeho Jeong		background GC thread. the default number is "25".
817e791d00bSDaeho Jeong
818e791d00bSDaeho JeongWhat:		/sys/fs/f2fs/<disk>/gc_valid_thresh_ratio
819e791d00bSDaeho JeongDate:		September 2024
820e791d00bSDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
821e791d00bSDaeho JeongDescription:	It controls the valid block ratio threshold not to trigger excessive GC
822e791d00bSDaeho Jeong		for zoned deivces. The initial value of it is 95(%). F2FS will stop the
823e791d00bSDaeho Jeong		background GC thread from intiating GC for sections having valid blocks
824e791d00bSDaeho Jeong		exceeding the ratio.
825*009a8241SChao Yu
826*009a8241SChao YuWhat:		/sys/fs/f2fs/<disk>/max_read_extent_count
827*009a8241SChao YuDate:		November 2024
828*009a8241SChao YuContact:	"Chao Yu" <chao@kernel.org>
829*009a8241SChao YuDescription:	It controls max read extent count for per-inode, the value of threshold
830*009a8241SChao Yu		is 10240 by default.
831