XFS With Linux 6.12 Adds New Ioctls To Exchange Contents Of Two Files

Written by Michael Larabel in Linux Storage on 19 September 2024 at 06:35 AM EDT. 31 Comments
LINUX STORAGE
The XFS file-system changes have been merged for the Linux 6.12 kernel and introduce new ioctls for being able to exchange the contents of two files.

The XFS file-system driver in Linux 6.12 adds the XFS_IOC_START_COMMIT and XFS_IOC_COMMIT_RANGE ioctls to manage atomic updates to file contents. The commit ioctl is similar to the existing XFS_IOC_EXCHANGE_RANGE but enforces that the file cannot have been changed since the sampling point.

The code comment for the new interface sums it up as:
"Using the same definition of file2 as struct xfs_exchange_range, commit the contents of file1 into file2 if file2 has the same inode number, mtime, and ctime as the arguments provided to the call. The old contents of file2 will be moved to file1."

The rest of the XFS changes for Linux 6.12 amount to an assortment of bug fixes.

XFS Linux 6.12


More details on the XFS updates via this pull that landed today into Linux 6.12 Git.
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