3

When creating a new Flash-Friendly Filesystem (f2fs) with mkfs.f2fs, there is a switch to turn on or off what is described as "heap-based allocation". The man page describes the switch as:

-a heap-based-allocation

Specify 1 or 0 to enable/disable heap based block allocation policy. If the value is equal to 1, each of active log areas are initially assigned separately according to the whole volume size. The default value is 1.

which, doesn't really specify what the feature does. Some searches suggest that this was changed from a default of on to a default of off (and suggested this was a "feature"), but there is very little I can find to describe what this option does and what the actual ramifications of having it on vs off are.

Kurt Fitzner
  • 197
  • 7
  • [This](https://www.kernel.org/doc/html/latest/filesystems/f2fs.html) provides a _little_ more information. Good question though. I may have to check [the source code](https://elixir.bootlin.com/linux/latest/source/fs/f2fs). – forest Mar 29 '22 at 23:44
  • https://github.com/torvalds/linux/search?q=NOHEAP and https://github.com/torvalds/linux/commit/7a20b8a61eff81bdb7097a578752a74860e9d142 is also useful. – forest Mar 29 '22 at 23:58

0 Answers0