Put the smarts in mkfs
Put the smarts in mkfs
Posted Feb 22, 2011 2:19 UTC (Tue) by sethml (guest, #8471)Parent article: Optimizing Linux with cheap flash drives
Now I think a practical good approach would be to tune the filesystem to the device. In particular, give, say, ext4 the ability to store various device characeristics (erase block size & alignment, any good region of the partition for frequently-changing data, max concurrently open sectors, etc.) in the filesystem header, and then have the kernel filesystem code tune its accesses to work well with the limitations of the device. Then add a flag to mkfs and tunefs which cause them to spend a few minutes benchmarking the device and heuristically deciding what the device characteristics are.
Even better of course would be to combine this approach with a log-structured fs, to really avoid the weaknesses of the hardware.
Not perfect, but a heck of a lot more likely to be useful than petitioning device manufacturers to do anything different.