Linux 6.13 To Expand Atomic Write Support To EXT4 & XFS

Written by Michael Larabel in Linux Storage on 15 November 2024 at 11:41 AM EST. 8 Comments
LINUX STORAGE
Prominent Linux developer Christian Brauner with Microsoft has begun sending out various pull requests of VFS feature changes for the imminent Linux 6.13 merge window. One of the interesting early pull requests is the VFS untorn writes series with getting atomic writes support enabled for the EXT4 and XFS file-system.

Back in Linux 6.11 there was atomic writes support for block devices with NVMe and SCSI support enabled. With Linux 6.13 the atomic write support is being extended to the file-systems with EXT4 and XFS initially benefiting.

Christian Brauner explained in the VFS untorn writes pull request:
"An atomic write is a write issed with torn-write protection. This means for a power failure or any hardware failure all or none of the data from the write will be stored, never a mix of old and new data.

This work is already supported for block devices. If a block device is opened with O_DIRECT and the block device supports atomic write, then FMODE_CAN_ATOMIC_WRITE is added to the file of the opened block device.

This pull request contains the work to expand atomic write support to filesystems, specifically ext4 and XFS. Currently, only support for writing exactly one filesystem block atomically is added.

Since it's now possible to have filesystem block size > page size for XFS, it's possible to write 4K+ blocks atomically on x86."

The Linux 6.13 features keep piling on for what should be an interesting next two weeks of the v6.13 merge window.
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