xref: /linux/Documentation/ABI/testing/sysfs-fs-f2fs (revision 0bfe9f790448012ef38abf4e78feb2e691e2d366)
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>
44a4db59acSJaegeuk KimDescription:
45a4db59acSJaegeuk Kim		 Shows first block address of MAIN area.
46a4db59acSJaegeuk Kim
473bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/ipu_policy
483bac380cSJaegeuk KimDate:		November 2013
493bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
50f5fa7c8bSHridya ValsarajuDescription:	Controls the in-place-update policy.
51f5fa7c8bSHridya Valsaraju		updates in f2fs. User can set:
5254a19b4dSMauro Carvalho Chehab
5354a19b4dSMauro Carvalho Chehab		====  =================
5454a19b4dSMauro Carvalho Chehab		0x01  F2FS_IPU_FORCE
5554a19b4dSMauro Carvalho Chehab		0x02  F2FS_IPU_SSR
5654a19b4dSMauro Carvalho Chehab		0x04  F2FS_IPU_UTIL
5754a19b4dSMauro Carvalho Chehab		0x08  F2FS_IPU_SSR_UTIL
5854a19b4dSMauro Carvalho Chehab		0x10  F2FS_IPU_FSYNC
5954a19b4dSMauro Carvalho Chehab		0x20  F2FS_IPU_ASYNC,
6054a19b4dSMauro Carvalho Chehab		0x40  F2FS_IPU_NOCACHE
6154a19b4dSMauro Carvalho Chehab		====  =================
6254a19b4dSMauro Carvalho Chehab
63f5fa7c8bSHridya Valsaraju		Refer segment.h for details.
643bac380cSJaegeuk Kim
653bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/min_ipu_util
663bac380cSJaegeuk KimDate:		November 2013
673bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
68f5fa7c8bSHridya ValsarajuDescription:	Controls the FS utilization condition for the in-place-update
69f5fa7c8bSHridya Valsaraju		policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
703bac380cSJaegeuk Kim
71c1ce1b02SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/min_fsync_blocks
72c1ce1b02SJaegeuk KimDate:		September 2014
73c1ce1b02SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
74f5fa7c8bSHridya ValsarajuDescription:	Controls the dirty page count condition for the in-place-update
75c1ce1b02SJaegeuk Kim		policies.
76c1ce1b02SJaegeuk Kim
77853137ceSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/min_seq_blocks
78853137ceSJaegeuk KimDate:		August 2018
79853137ceSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
80f5fa7c8bSHridya ValsarajuDescription:	Controls the dirty page count condition for batched sequential
81f5fa7c8bSHridya Valsaraju		writes in writepages.
82853137ceSJaegeuk Kim
83b32d73abSChao YuWhat:		/sys/fs/f2fs/<disk>/min_hot_blocks
84b32d73abSChao YuDate:		March 2017
85b32d73abSChao YuContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
86f5fa7c8bSHridya ValsarajuDescription:	Controls the dirty page count condition for redefining hot data.
87b32d73abSChao Yu
88a2a12b67SChao YuWhat:		/sys/fs/f2fs/<disk>/min_ssr_sections
89a2a12b67SChao YuDate:		October 2017
90a2a12b67SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
91f5fa7c8bSHridya ValsarajuDescription:	Controls the free section threshold to trigger SSR allocation.
92f5fa7c8bSHridya Valsaraju		If this is large, SSR mode will be enabled early.
93a2a12b67SChao Yu
943bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_small_discards
953bac380cSJaegeuk KimDate:		November 2013
963bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
97f5fa7c8bSHridya ValsarajuDescription:	Controls the issue rate of discard commands that consist of small
98f5fa7c8bSHridya Valsaraju		blocks less than 2MB. The candidates to be discarded are cached until
99f5fa7c8bSHridya Valsaraju		checkpoint is triggered, and issued during the checkpoint.
100f5fa7c8bSHridya Valsaraju		By default, it is disabled with 0.
1013bac380cSJaegeuk Kim
102969d1b18SChao YuWhat:		/sys/fs/f2fs/<disk>/discard_granularity
103969d1b18SChao YuDate:		July 2017
104969d1b18SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
105f5fa7c8bSHridya ValsarajuDescription:	Controls discard granularity of inner discard thread. Inner thread
106969d1b18SChao Yu		will not issue discards with size that is smaller than granularity.
107f5fa7c8bSHridya Valsaraju		The unit size is one block(4KB), now only support configuring
108f5fa7c8bSHridya Valsaraju		in range of [1, 512]. Default value is 4(=16KB).
109969d1b18SChao Yu
11003f2c02dSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/umount_discard_timeout
11103f2c02dSJaegeuk KimDate:		January 2019
11203f2c02dSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
113f5fa7c8bSHridya ValsarajuDescription:	Set timeout to issue discard commands during umount.
11403f2c02dSJaegeuk Kim	        Default: 5 secs
11503f2c02dSJaegeuk Kim
1163bac380cSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_victim_search
1173bac380cSJaegeuk KimDate:		January 2014
1183bac380cSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
119f5fa7c8bSHridya ValsarajuDescription:	Controls the number of trials to find a victim segment
120f5fa7c8bSHridya Valsaraju		when conducting SSR and cleaning operations. The default value
121f5fa7c8bSHridya Valsaraju		is 4096 which covers 8GB block address range.
122cdfc41c1SJaegeuk Kim
12334655575SChao YuWhat:		/sys/fs/f2fs/<disk>/migration_granularity
12434655575SChao YuDate:		October 2018
12534655575SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
126f5fa7c8bSHridya ValsarajuDescription:	Controls migration granularity of garbage collection on large
12734655575SChao Yu		section, it can let GC move partial segment{s} of one section
12834655575SChao Yu		in one GC cycle, so that dispersing heavy overhead GC to
12934655575SChao Yu		multiple lightweight one.
13034655575SChao Yu
13191796825SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/dir_level
13291796825SJaegeuk KimDate:		March 2014
13391796825SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
134f5fa7c8bSHridya ValsarajuDescription:	Controls the directory level for large directory. If a
135f5fa7c8bSHridya Valsaraju		directory has a number of files, it can reduce the file lookup
136f5fa7c8bSHridya Valsaraju		latency by increasing this dir_level value. Otherwise, it
137f5fa7c8bSHridya Valsaraju		needs to decrease this value to reduce the space overhead.
138f5fa7c8bSHridya Valsaraju		The default value is 0.
13991796825SJaegeuk Kim
140cdfc41c1SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/ram_thresh
141cdfc41c1SJaegeuk KimDate:		March 2014
142cdfc41c1SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
143f5fa7c8bSHridya ValsarajuDescription:	Controls the memory footprint used by free nids and cached
144f5fa7c8bSHridya Valsaraju		nat entries. By default, 1 is set, which indicates
145f5fa7c8bSHridya Valsaraju		10 MB / 1 GB RAM.
146bba681cbSJaegeuk Kim
1476f6d9fe2SChao YuWhat:		/sys/fs/f2fs/<disk>/batched_trim_sections
148bba681cbSJaegeuk KimDate:		February 2015
149bba681cbSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
150f5fa7c8bSHridya ValsarajuDescription:	Controls the trimming rate in batch mode.
151377224c4SChao Yu		<deprecated>
15260b99b48SJaegeuk Kim
15360b99b48SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/cp_interval
15460b99b48SJaegeuk KimDate:		October 2015
15560b99b48SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
156f5fa7c8bSHridya ValsarajuDescription:	Controls the checkpoint timing, set to 60 seconds by default.
157ea1a29a0SChao Yu
158d0239e1bSJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/idle_interval
159d0239e1bSJaegeuk KimDate:		January 2016
160d0239e1bSJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
161f5fa7c8bSHridya ValsarajuDescription:	Controls the idle timing of system, if there is no FS operation
162f5fa7c8bSHridya Valsaraju		during given interval.
163f5fa7c8bSHridya Valsaraju		Set to 5 seconds by default.
164a7d10cf3SSahitya Tummala
165a7d10cf3SSahitya TummalaWhat:		/sys/fs/f2fs/<disk>/discard_idle_interval
166a7d10cf3SSahitya TummalaDate:		September 2018
167a7d10cf3SSahitya TummalaContact:	"Chao Yu" <yuchao0@huawei.com>
168a7d10cf3SSahitya TummalaContact:	"Sahitya Tummala" <stummala@codeaurora.org>
169f5fa7c8bSHridya ValsarajuDescription:	Controls the idle timing of discard thread given
170f5fa7c8bSHridya Valsaraju		this time interval.
171f5fa7c8bSHridya Valsaraju		Default is 5 secs.
172a7d10cf3SSahitya Tummala
173a7d10cf3SSahitya TummalaWhat:		/sys/fs/f2fs/<disk>/gc_idle_interval
174a7d10cf3SSahitya TummalaDate:		September 2018
175a7d10cf3SSahitya TummalaContact:	"Chao Yu" <yuchao0@huawei.com>
176a7d10cf3SSahitya TummalaContact:	"Sahitya Tummala" <stummala@codeaurora.org>
177f5fa7c8bSHridya ValsarajuDescription:    Controls the idle timing for gc path. Set to 5 seconds by default.
178d0239e1bSJaegeuk Kim
179b32d73abSChao YuWhat:		/sys/fs/f2fs/<disk>/iostat_enable
180b32d73abSChao YuDate:		August 2017
181b32d73abSChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
182f5fa7c8bSHridya ValsarajuDescription:	Controls to enable/disable IO stat.
183b32d73abSChao Yu
184ea1a29a0SChao YuWhat:		/sys/fs/f2fs/<disk>/ra_nid_pages
185ea1a29a0SChao YuDate:		October 2015
186ea1a29a0SChao YuContact:	"Chao Yu" <chao2.yu@samsung.com>
187f5fa7c8bSHridya ValsarajuDescription:	Controls the count of nid pages to be readaheaded.
188f5fa7c8bSHridya Valsaraju		When building free nids, F2FS reads NAT blocks ahead for
189f5fa7c8bSHridya Valsaraju		speed up. Default is 0.
1902304cb0cSChao Yu
1912304cb0cSChao YuWhat:		/sys/fs/f2fs/<disk>/dirty_nats_ratio
1922304cb0cSChao YuDate:		January 2016
1932304cb0cSChao YuContact:	"Chao Yu" <chao2.yu@samsung.com>
194f5fa7c8bSHridya ValsarajuDescription:	Controls dirty nat entries ratio threshold, if current
1952304cb0cSChao Yu		ratio exceeds configured threshold, checkpoint will
1962304cb0cSChao Yu		be triggered for flushing dirty nat entries.
1978f1dbbbbSShuoran Liu
1988f1dbbbbSShuoran LiuWhat:		/sys/fs/f2fs/<disk>/lifetime_write_kbytes
1998f1dbbbbSShuoran LiuDate:		January 2016
2008f1dbbbbSShuoran LiuContact:	"Shuoran Liu" <liushuoran@huawei.com>
201f5fa7c8bSHridya ValsarajuDescription:	Shows total written kbytes issued to disk.
20256412894SChao Yu
2039ac19faaSEric BiggersWhat:		/sys/fs/f2fs/<disk>/features
204b32d73abSChao YuDate:		July 2017
205b32d73abSChao YuContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
206f5fa7c8bSHridya ValsarajuDescription:	Shows all enabled features in current device.
207b32d73abSChao Yu
20856412894SChao YuWhat:		/sys/fs/f2fs/<disk>/inject_rate
20956412894SChao YuDate:		May 2016
21056412894SChao YuContact:	"Sheng Yong" <shengyong1@huawei.com>
211f5fa7c8bSHridya ValsarajuDescription:	Controls the injection rate of arbitrary faults.
21256412894SChao Yu
21356412894SChao YuWhat:		/sys/fs/f2fs/<disk>/inject_type
21456412894SChao YuDate:		May 2016
21556412894SChao YuContact:	"Sheng Yong" <shengyong1@huawei.com>
216f5fa7c8bSHridya ValsarajuDescription:	Controls the injection type of arbitrary faults.
217f5fa7c8bSHridya Valsaraju
218f5fa7c8bSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/dirty_segments
219f5fa7c8bSHridya ValsarajuDate:		October 2017
220f5fa7c8bSHridya ValsarajuContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
221f5fa7c8bSHridya ValsarajuDescription:	Shows the number of dirty segments.
222daeb433eSChao Yu
223daeb433eSChao YuWhat:		/sys/fs/f2fs/<disk>/reserved_blocks
224daeb433eSChao YuDate:		June 2017
225daeb433eSChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
226f5fa7c8bSHridya ValsarajuDescription:	Controls target reserved blocks in system, the threshold
22780d42145SYunlong Song		is soft, it could exceed current available user space.
22880d42145SYunlong Song
22980d42145SYunlong SongWhat:		/sys/fs/f2fs/<disk>/current_reserved_blocks
23080d42145SYunlong SongDate:		October 2017
23180d42145SYunlong SongContact:	"Yunlong Song" <yunlong.song@huawei.com>
23280d42145SYunlong SongContact:	"Chao Yu" <yuchao0@huawei.com>
233f5fa7c8bSHridya ValsarajuDescription:	Shows current reserved blocks in system, it may be temporarily
23480d42145SYunlong Song		smaller than target_reserved_blocks, but will gradually
23580d42145SYunlong Song		increase to target_reserved_blocks when more free blocks are
23680d42145SYunlong Song		freed by user later.
237d9872a69SJaegeuk Kim
238d9872a69SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/gc_urgent
239d9872a69SJaegeuk KimDate:		August 2017
240d9872a69SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
241f5fa7c8bSHridya ValsarajuDescription:	Do background GC agressively when set. When gc_urgent = 1,
242f5fa7c8bSHridya Valsaraju		background thread starts to do GC by given gc_urgent_sleep_time
2430e5e8111SDaeho Jeong		interval. When gc_urgent = 2, F2FS will lower the bar of
2440e5e8111SDaeho Jeong		checking idle in order to process outstanding discard commands
2450e5e8111SDaeho Jeong		and GC a little bit aggressively. It is set to 0 by default.
246d9872a69SJaegeuk Kim
247d9872a69SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/gc_urgent_sleep_time
248d9872a69SJaegeuk KimDate:		August 2017
249d9872a69SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
250f5fa7c8bSHridya ValsarajuDescription:	Controls sleep time of GC urgent mode. Set to 500ms by default.
251f6df8f23SSheng Yong
252f6df8f23SSheng YongWhat:		/sys/fs/f2fs/<disk>/readdir_ra
253f6df8f23SSheng YongDate:		November 2017
254f6df8f23SSheng YongContact:	"Sheng Yong" <shengyong1@huawei.com>
255f5fa7c8bSHridya ValsarajuDescription:	Controls readahead inode block in readdir. Enabled by default.
256f5fa7c8bSHridya Valsaraju
257f5fa7c8bSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/gc_pin_file_thresh
258f5fa7c8bSHridya ValsarajuDate:		January 2018
259f5fa7c8bSHridya ValsarajuContact:	Jaegeuk Kim <jaegeuk@kernel.org>
260f5fa7c8bSHridya ValsarajuDescription:	This indicates how many GC can be failed for the pinned
261f5fa7c8bSHridya Valsaraju		file. If it exceeds this, F2FS doesn't guarantee its pinning
262f5fa7c8bSHridya Valsaraju		state. 2048 trials is set by default.
263846ae671SChao Yu
264846ae671SChao YuWhat:		/sys/fs/f2fs/<disk>/extension_list
265846ae671SChao YuDate:		Feburary 2018
266846ae671SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
267f5fa7c8bSHridya ValsarajuDescription:	Used to control configure extension list:
268846ae671SChao Yu		- Query: cat /sys/fs/f2fs/<disk>/extension_list
269b6a06cbbSChao Yu		- Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
270b6a06cbbSChao Yu		- Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
271b6a06cbbSChao Yu		- [h] means add/del hot file extension
272b6a06cbbSChao Yu		- [c] means add/del cold file extension
2734d3aed70SDaniel Rosenberg
2744d3aed70SDaniel RosenbergWhat:		/sys/fs/f2fs/<disk>/unusable
2754d3aed70SDaniel RosenbergDate		April 2019
2764d3aed70SDaniel RosenbergContact:	"Daniel Rosenberg" <drosen@google.com>
277f5fa7c8bSHridya ValsarajuDescription:	If checkpoint=disable, it displays the number of blocks that
278f5fa7c8bSHridya Valsaraju		are unusable.
279f5fa7c8bSHridya Valsaraju		If checkpoint=enable it displays the enumber of blocks that
280f5fa7c8bSHridya Valsaraju		would be unusable if checkpoint=disable were to be set.
2815aba5430SDaniel Rosenberg
2825aba5430SDaniel RosenbergWhat:		/sys/fs/f2fs/<disk>/encoding
2835aba5430SDaniel RosenbergDate		July 2019
2845aba5430SDaniel RosenbergContact:	"Daniel Rosenberg" <drosen@google.com>
285f5fa7c8bSHridya ValsarajuDescription:	Displays name and version of the encoding set for the filesystem.
2865aba5430SDaniel Rosenberg		If no encoding is set, displays (none)
287fc7100eaSHridya Valsaraju
288fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/free_segments
289fc7100eaSHridya ValsarajuDate:		September 2019
290fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
291fc7100eaSHridya ValsarajuDescription:	Number of free segments in disk.
292fc7100eaSHridya Valsaraju
293fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/cp_foreground_calls
294fc7100eaSHridya ValsarajuDate:		September 2019
295fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
296fc7100eaSHridya ValsarajuDescription:	Number of checkpoint operations performed on demand. Available when
297fc7100eaSHridya Valsaraju		CONFIG_F2FS_STAT_FS=y.
298fc7100eaSHridya Valsaraju
299fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/cp_background_calls
300fc7100eaSHridya ValsarajuDate:		September 2019
301fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
302fc7100eaSHridya ValsarajuDescription:	Number of checkpoint operations performed in the background to
303fc7100eaSHridya Valsaraju		free segments. Available when CONFIG_F2FS_STAT_FS=y.
304fc7100eaSHridya Valsaraju
305fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/gc_foreground_calls
306fc7100eaSHridya ValsarajuDate:		September 2019
307fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
308fc7100eaSHridya ValsarajuDescription:	Number of garbage collection operations performed on demand.
309fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
310fc7100eaSHridya Valsaraju
311fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/gc_background_calls
312fc7100eaSHridya ValsarajuDate:		September 2019
313fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
314fc7100eaSHridya ValsarajuDescription:	Number of garbage collection operations triggered in background.
315fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
316fc7100eaSHridya Valsaraju
317fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/moved_blocks_foreground
318fc7100eaSHridya ValsarajuDate:		September 2019
319fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
320fc7100eaSHridya ValsarajuDescription:	Number of blocks moved by garbage collection in foreground.
321fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
322fc7100eaSHridya Valsaraju
323fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/moved_blocks_background
324fc7100eaSHridya ValsarajuDate:		September 2019
325fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
326fc7100eaSHridya ValsarajuDescription:	Number of blocks moved by garbage collection in background.
327fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
328fc7100eaSHridya Valsaraju
329fc7100eaSHridya ValsarajuWhat:		/sys/fs/f2fs/<disk>/avg_vblocks
330fc7100eaSHridya ValsarajuDate:		September 2019
331fc7100eaSHridya ValsarajuContact:	"Hridya Valsaraju" <hridya@google.com>
332fc7100eaSHridya ValsarajuDescription:	Average number of valid blocks.
333fc7100eaSHridya Valsaraju		Available when CONFIG_F2FS_STAT_FS=y.
334a7e679b5SJaegeuk Kim
335a7e679b5SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/mounted_time_sec
336a7e679b5SJaegeuk KimDate:		February 2020
337a7e679b5SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
338a7e679b5SJaegeuk KimDescription:	Show the mounted time in secs of this partition.
339da9953b7SJaegeuk Kim
340da9953b7SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/data_io_flag
341da9953b7SJaegeuk KimDate:		April 2020
342da9953b7SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
343da9953b7SJaegeuk KimDescription:	Give a way to attach REQ_META|FUA to data writes
344da9953b7SJaegeuk Kim		given temperature-based bits. Now the bits indicate:
34554a19b4dSMauro Carvalho Chehab
34654a19b4dSMauro Carvalho Chehab		+-------------------+-------------------+
34754a19b4dSMauro Carvalho Chehab		|      REQ_META     |      REQ_FUA      |
34854a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
34954a19b4dSMauro Carvalho Chehab		|    5 |    4 |   3 |    2 |    1 |   0 |
35054a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
35154a19b4dSMauro Carvalho Chehab		| Cold | Warm | Hot | Cold | Warm | Hot |
35254a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
3532bc4bea3SDaeho Jeong
35432b6aba8SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/node_io_flag
35532b6aba8SJaegeuk KimDate:		June 2020
35632b6aba8SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
35732b6aba8SJaegeuk KimDescription:	Give a way to attach REQ_META|FUA to node writes
35832b6aba8SJaegeuk Kim		given temperature-based bits. Now the bits indicate:
35954a19b4dSMauro Carvalho Chehab
36054a19b4dSMauro Carvalho Chehab		+-------------------+-------------------+
36154a19b4dSMauro Carvalho Chehab		|      REQ_META     |      REQ_FUA      |
36254a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
36354a19b4dSMauro Carvalho Chehab		|    5 |    4 |   3 |    2 |    1 |   0 |
36454a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
36554a19b4dSMauro Carvalho Chehab		| Cold | Warm | Hot | Cold | Warm | Hot |
36654a19b4dSMauro Carvalho Chehab		+------+------+-----+------+------+-----+
36732b6aba8SJaegeuk Kim
3682bc4bea3SDaeho JeongWhat:		/sys/fs/f2fs/<disk>/iostat_period_ms
3692bc4bea3SDaeho JeongDate:		April 2020
3702bc4bea3SDaeho JeongContact:	"Daeho Jeong" <daehojeong@google.com>
3712bc4bea3SDaeho JeongDescription:	Give a way to change iostat_period time. 3secs by default.
3722bc4bea3SDaeho Jeong		The new iostat trace gives stats gap given the period.
37310208567SJaegeuk KimWhat:		/sys/fs/f2fs/<disk>/max_io_bytes
37410208567SJaegeuk KimDate:		December 2020
37510208567SJaegeuk KimContact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
37610208567SJaegeuk KimDescription:	This gives a control to limit the bio size in f2fs.
37710208567SJaegeuk Kim		Default is zero, which will follow underlying block layer limit,
37810208567SJaegeuk Kim		whereas, if it has a certain bytes value, f2fs won't submit a
37910208567SJaegeuk Kim		bio larger than that size.
380*0bfe9f79SChao Yu
381*0bfe9f79SChao YuWhat:		/sys/fs/f2fs/<disk>/stat/sb_status
382*0bfe9f79SChao YuDate:		December 2020
383*0bfe9f79SChao YuContact:	"Chao Yu" <yuchao0@huawei.com>
384*0bfe9f79SChao YuDescription:	Show status of f2fs superblock in real time.
385*0bfe9f79SChao Yu
386*0bfe9f79SChao Yu		====== ===================== =================================
387*0bfe9f79SChao Yu		value  sb status macro       description
388*0bfe9f79SChao Yu		0x1    SBI_IS_DIRTY          dirty flag for checkpoint
389*0bfe9f79SChao Yu		0x2    SBI_IS_CLOSE          specify unmounting
390*0bfe9f79SChao Yu		0x4    SBI_NEED_FSCK         need fsck.f2fs to fix
391*0bfe9f79SChao Yu		0x8    SBI_POR_DOING         recovery is doing or not
392*0bfe9f79SChao Yu		0x10   SBI_NEED_SB_WRITE     need to recover superblock
393*0bfe9f79SChao Yu		0x20   SBI_NEED_CP           need to checkpoint
394*0bfe9f79SChao Yu		0x40   SBI_IS_SHUTDOWN       shutdown by ioctl
395*0bfe9f79SChao Yu		0x80   SBI_IS_RECOVERED      recovered orphan/data
396*0bfe9f79SChao Yu		0x100  SBI_CP_DISABLED       CP was disabled last mount
397*0bfe9f79SChao Yu		0x200  SBI_CP_DISABLED_QUICK CP was disabled quickly
398*0bfe9f79SChao Yu		0x400  SBI_QUOTA_NEED_FLUSH  need to flush quota info in CP
399*0bfe9f79SChao Yu		0x800  SBI_QUOTA_SKIP_FLUSH  skip flushing quota in current CP
400*0bfe9f79SChao Yu		0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
401*0bfe9f79SChao Yu		0x2000 SBI_IS_RESIZEFS       resizefs is in process
402*0bfe9f79SChao Yu		====== ===================== =================================
403