[f2fs] Correct error handling in Write() and Truncate()
It adds handling for corner cases related to no space and max size.
Also, since f2fs needs at least 100MiB device size,
device_block_count in fs_test is reconfigured.
Test: fx test fs-tests large-fs-tests
FUCHSIA_DIR$ patch -p1 < \
Reviewed-by: Brett Wilson <firstname.lastname@example.org>
8 files changed
What is F2FS?
F2FS is the most commonly used log-structured file system in Linux. It supports flash-friendly features such as adaptive logging, multi-head logging, fsync acceleration, and node address translation. For more information see: https://www.usenix.org/conference/fast15/technical-sessions/presentation/lee
1st release (Apr-06-2021)
- Features: mkfs, mount/umount, read, write, rmdir, mkdir, rename, fsync, lseek, link, unlink
- Fuchsia base code ; Thu Mar 11 08:53:24 2021 Prashanth Swaminathan,76a08ad1474 [speak] Migrate to new component templates
- There is no cache. Every request is handled as a synchronous operation.
- fsync() triggers checkpointing
- lock granularity: file operation
- LFS is used for block allocation by default, and IPU is forced when the number of free sections is below 50%.
- no background/foreground gc
- disable the roll-forward recovery
- 6 active logs
- disable the ext-identify feature
- block allocation: LFS, IPU
- fsck do nothing, but it returns true
- no discard
2nd release (May-28-2021)
- Features: truncate, ssr, fsync, recovery
- Fuchsia base code ; Thu May 20 07:25:45 2021 Yilong Li, 02c0dfff0fdb
- support the roll-forward recovery and file level fsync()
- block allocation: LFS, IPU, SSR
3rd release (June-25-2021)
- Features: fsck, mount option, mkfs option
- fsck (base: bbf6e62)
- support the ext-identify feature
- support discard
4th release (July-30-2021 ~)
- Features: buffered IO, gc (if writable PagedVfs is available)
- background/foreground gc
- caching node/meta blocks
- read ahead
- Page level locking
- buffered IO
- IPU can be disabled.
- support fvm
How to build
$ fx set core.x64 --with-base //bundles:tools --with-base //bundles:tests --with-base third_party/f2fs $ fx emu -N --headless (see third_party/f2fs/test_files/README.md for test)