F2FS Preparing Support For Atomic Replace

Written by Michael Larabel in Linux Storage on 28 September 2022 at 03:42 PM EDT. 15 Comments
LINUX STORAGE --
A new feature being worked on for the Flash-Friendly File-System (F2FS) is the ability to atomically replace files.

Google engineer Daeho Jeong has been working on the new F2FS_IOC_START_ATOMIC_REPLACE ioctl for atomically replacing the entire contents of a file.

Daeho Jeong sums it up in the patch as:
Introduce a new ioctl to replace the whole content of a file atomically, which means it induces truncate and content update at the same time. We can start it with F2FS_IOC_START_ATOMIC_REPLACE and complete it with F2FS_IOC_COMMIT_ATOMIC_WRITE. Or abort it with F2FS_IOC_ABORT_ATOMIC_WRITE.

This new F2FS atomic replace ioctl is currently being vetted via the F2FS dev-test repository. There is also a F2FS-Tools patch for supporting the atomic replace ioctl with the f2fs_io_write command.

We'll see if this F2FS_IOC_START_ATOMIC_REPLACE makes it to "dev" and ends up being part of the changes sent in for the F2FS file-system with the upcoming Linux 6.1 merge window.
Related News
About The Author
Author picture

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