F2FS With Linux 6.2 Lands Atomic Replace, Per-Block Age-Based Extent Cache

Written by Michael Larabel in Linux Storage on 15 December 2022 at 05:17 AM EST. 21 Comments
Jaegeuk Kim has ushered in the Flash Friendly File-System (F2FS) updates for the in-development Linux 6.2 kernel, which is headlined by two new features for this file-system.

First up, F2FS with this kernel is introducing a new atomic replace feature (F2FS_IOC_START_ATOMIC_REPLACE). The new atomic replace functionality is a variant of F2FS' former atomic write functionality and is able to guarantee per-file atomicity. This atomic replace code was previously discussed on Phoronix for atomically replacing the entire contents of a file. This atomic replace functionality should work out better on Android than the current atomic code.

The other notable change is introducing a per-block age-based extent cache that is focused on the per-block age of a file so that F2FS' block allocator can split hot and cold data blocks more accurately.

F2FS with Linux 6.2 also adds new sysfs tunables of discard_urgent_util, gc_mode, and max_ordered_discard. There is also an optimization for iterating over sparse directories, a barrier mount option, and various fixes. With the F2FS "barrier" mount option, cache_flush commands can be issued as opposed to its "nobarrier" mode.

Downloads and more details on the F2FS updates with Linux 6.2 via this pull request that has already been honored and merged to mainline.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week