Linux 6.11 To Introduce Block Atomic Writes - Including NVMe & SCSI Support

Written by Michael Larabel in Linux Storage on 7 July 2024 at 06:19 AM EDT. 14 Comments
The Linux kernel's block subsystem for storage is poised to introduce support for atomic writes with the upcoming Linux 6.11 merge window.

Ahead of the Linux 6.11 merge window opening up in the next week or so, block subsystem maintainer Jens Axboe has been preparing his "for-6.11" Git branches of new material set to be introduced. Among the recently queued up patches have been Oracle's work around atomic writes. The block atomic writes support includes the plumbing for SCSI and NVMe storage and is set for merging in Linux 6.11.

Oracle engineer John Garry led the charge on this block atomic writes capabilities and explained in the patch series:
"This series introduces a proposal to implementing atomic writes in the kernel for torn-write protection.

This series takes the approach of adding a new "atomic" flag to each of pwritev2() and iocb->ki_flags - RWF_ATOMIC and IOCB_ATOMIC, respectively. When set, these indicate that we want the write issued "atomically".

Only direct IO is supported and for block devices here. For this, atomic write HW is required, like SCSI ATOMIC WRITE (16).
The goal here is to provide an interface that allows applications use application-specific block sizes larger than logical block size reported by the storage device or larger than filesystem block size as reported by stat().

With this new interface, application blocks will never be torn or fractured when written. For a power fail, for each individual application block, all or none of the data to be written. A racing atomic write and read will mean that the read sees all the old data or all the new data, but never a mix of old and new.
SCSI sd.c and scsi_debug and NVMe kernel support is added."

Separately there are patches pending for the XFS file-system in making use of this atomic write support.

atomic write patches for block code

This atomic write support is living within the linux-block.git's for-6.11/block branch until the Linux 6.11 merge window opens up.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week