f2fs.rst (e291c116f60f3c1ca98090f0f8e7c77e658562fb) f2fs.rst (71644dff481180ba024ac4f5cb1f068756357adf)
1.. SPDX-License-Identifier: GPL-2.0
2
3==========================================
4WHAT IS Flash-Friendly File System (F2FS)?
5==========================================
6
7NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards, have
8been equipped on a variety systems ranging from mobile to server systems. Since

--- 11 unchanged lines hidden (view full) ---

20F2FS and its tools support various parameters not only for configuring on-disk
21layout, but also for selecting allocation and cleaning algorithms.
22
23The following git tree provides the file system formatting tool (mkfs.f2fs),
24a consistency checking tool (fsck.f2fs), and a debugging tool (dump.f2fs).
25
26- git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
27
1.. SPDX-License-Identifier: GPL-2.0
2
3==========================================
4WHAT IS Flash-Friendly File System (F2FS)?
5==========================================
6
7NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards, have
8been equipped on a variety systems ranging from mobile to server systems. Since

--- 11 unchanged lines hidden (view full) ---

20F2FS and its tools support various parameters not only for configuring on-disk
21layout, but also for selecting allocation and cleaning algorithms.
22
23The following git tree provides the file system formatting tool (mkfs.f2fs),
24a consistency checking tool (fsck.f2fs), and a debugging tool (dump.f2fs).
25
26- git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
27
28For reporting bugs and sending patches, please use the following mailing list:
28For sending patches, please use the following mailing list:
29
30- linux-f2fs-devel@lists.sourceforge.net
31
29
30- linux-f2fs-devel@lists.sourceforge.net
31
32For reporting bugs, please use the following f2fs bug tracker link:
33
34- https://bugzilla.kernel.org/enter_bug.cgi?product=File%20System&component=f2fs
35
32Background and Design issues
33============================
34
35Log-structured File System (LFS)
36--------------------------------
37"A log-structured file system writes all modifications to disk sequentially in
38a log-like structure, thereby speeding up both file writing and crash recovery.
39The log is the only structure on disk; it contains indexing information so that

--- 109 unchanged lines hidden (view full) ---

149 to eliminate redundant command issues. If the underlying
150 device handles the cache_flush command relatively slowly,
151 recommend to enable this option.
152nobarrier This option can be used if underlying storage guarantees
153 its cached data should be written to the novolatile area.
154 If this option is set, no cache_flush commands are issued
155 but f2fs still guarantees the write ordering of all the
156 data writes.
36Background and Design issues
37============================
38
39Log-structured File System (LFS)
40--------------------------------
41"A log-structured file system writes all modifications to disk sequentially in
42a log-like structure, thereby speeding up both file writing and crash recovery.
43The log is the only structure on disk; it contains indexing information so that

--- 109 unchanged lines hidden (view full) ---

153 to eliminate redundant command issues. If the underlying
154 device handles the cache_flush command relatively slowly,
155 recommend to enable this option.
156nobarrier This option can be used if underlying storage guarantees
157 its cached data should be written to the novolatile area.
158 If this option is set, no cache_flush commands are issued
159 but f2fs still guarantees the write ordering of all the
160 data writes.
161barrier If this option is set, cache_flush commands are allowed to be
162 issued.
157fastboot This option is used when a system wants to reduce mount
158 time as much as possible, even though normal performance
159 can be sacrificed.
160extent_cache Enable an extent cache based on rb-tree, it can cache
161 as many as extent which map between contiguous logical
162 address and physical address per inode, resulting in
163 increasing the cache hit ratio. Set by default.
164noextent_cache Disable an extent cache based on rb-tree explicitly, see

--- 29 unchanged lines hidden (view full) ---

194 FAULT_TRUNCATE 0x000000400
195 FAULT_READ_IO 0x000000800
196 FAULT_CHECKPOINT 0x000001000
197 FAULT_DISCARD 0x000002000
198 FAULT_WRITE_IO 0x000004000
199 FAULT_SLAB_ALLOC 0x000008000
200 FAULT_DQUOT_INIT 0x000010000
201 FAULT_LOCK_OP 0x000020000
163fastboot This option is used when a system wants to reduce mount
164 time as much as possible, even though normal performance
165 can be sacrificed.
166extent_cache Enable an extent cache based on rb-tree, it can cache
167 as many as extent which map between contiguous logical
168 address and physical address per inode, resulting in
169 increasing the cache hit ratio. Set by default.
170noextent_cache Disable an extent cache based on rb-tree explicitly, see

--- 29 unchanged lines hidden (view full) ---

200 FAULT_TRUNCATE 0x000000400
201 FAULT_READ_IO 0x000000800
202 FAULT_CHECKPOINT 0x000001000
203 FAULT_DISCARD 0x000002000
204 FAULT_WRITE_IO 0x000004000
205 FAULT_SLAB_ALLOC 0x000008000
206 FAULT_DQUOT_INIT 0x000010000
207 FAULT_LOCK_OP 0x000020000
208 FAULT_BLKADDR 0x000040000
202 =================== ===========
203mode=%s Control block allocation mode which supports "adaptive"
204 and "lfs". In "lfs" mode, there should be no random
205 writes towards main area.
206 "fragment:segment" and "fragment:block" are newly added here.
207 These are developer options for experiments to simulate filesystem
208 fragmentation/after-GC situation itself. The developers use these
209 modes to understand filesystem fragmentation/after-GC condition well,

--- 125 unchanged lines hidden (view full) ---

335 default, it is helpful for large sized SMR or ZNS devices to
336 reduce memory cost by getting rid of fs metadata supports small
337 discard.
338memory=%s Control memory mode. This supports "normal" and "low" modes.
339 "low" mode is introduced to support low memory devices.
340 Because of the nature of low memory devices, in this mode, f2fs
341 will try to save memory sometimes by sacrificing performance.
342 "normal" mode is the default mode and same as before.
209 =================== ===========
210mode=%s Control block allocation mode which supports "adaptive"
211 and "lfs". In "lfs" mode, there should be no random
212 writes towards main area.
213 "fragment:segment" and "fragment:block" are newly added here.
214 These are developer options for experiments to simulate filesystem
215 fragmentation/after-GC situation itself. The developers use these
216 modes to understand filesystem fragmentation/after-GC condition well,

--- 125 unchanged lines hidden (view full) ---

342 default, it is helpful for large sized SMR or ZNS devices to
343 reduce memory cost by getting rid of fs metadata supports small
344 discard.
345memory=%s Control memory mode. This supports "normal" and "low" modes.
346 "low" mode is introduced to support low memory devices.
347 Because of the nature of low memory devices, in this mode, f2fs
348 will try to save memory sometimes by sacrificing performance.
349 "normal" mode is the default mode and same as before.
350age_extent_cache Enable an age extent cache based on rb-tree. It records
351 data block update frequency of the extent per inode, in
352 order to provide better temperature hints for data block
353 allocation.
343======================== ============================================================
344
345Debugfs Entries
346===============
347
348/sys/kernel/debug/f2fs/ contains information about all the partitions mounted as
349f2fs. Each file shows the whole f2fs information.
350

--- 541 unchanged lines hidden ---
354======================== ============================================================
355
356Debugfs Entries
357===============
358
359/sys/kernel/debug/f2fs/ contains information about all the partitions mounted as
360f2fs. Each file shows the whole f2fs information.
361

--- 541 unchanged lines hidden ---