`block_volume_format` needlessly produces small wasteful f2fs partitions
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 4
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
the choice of FS in block_volume_format should be user configurable, as that piece of code cannot know what FS is better for each particular usage. but we have what we have...
but for the case of openwrt rootfs_data partitions, it is arguably making the wrong choice:
-
it chooses f2fs for partitions larger than 100MB. this is extremely wasteful: a 100MB f2fs partition has an overhead of about 40%! so you only get 60 usable megs out of your 100 megs, it's crazy. if auto switching is used at all, IMHO it should not cause overheads higher than 10%, so that would move the switch point to around 400 or 500 megs.
-
it is well known that f2fs suffers from corruption when subject to unclean shutdowns. it may be an acceptable risk for some battery-powered devices (which are unlikely to power off unexpectedly) such as phones, especially when benchmarks are given more importance than user's data by manufacturers, but it is a bad choice for devices that are typically always shutdown uncleanly, like openwrt routers. we probably do not see many corruption events only because the usual openwrt install writes so little to the disk; but then see next point...
-
the performance advantages (in time and write amplification/wear) of f2fs are noticeable when the FS is being written to heavily. there is no advantage to using f2fs (and real disadvantages) if you write little to it. this probably calls into question whether f2fs should be used automatically at all.
to recap: maybe always choose ext4. but if not, the cutoff point of 100MB should be raised significantly.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the block_volume_format entry point and tracing how it selects f2fs versus other filesystems. The issue presents several possible outcomes—configurable selection, a higher cutoff, or always choosing ext4—so confirm the intended policy and identify relevant tests before defining done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100