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