XFS Reverse-Mapping Proposed For Linux 4.8: Getting Ready For New File-System Features

Written by Michael Larabel in Linux Storage on 6 August 2016 at 08:09 PM EDT. 20 Comments
LINUX STORAGE
Last week was the main XFS feature pull for Linux 4.8 while one day before the 4.8 merge window is expected to close, XFS maintainer Dave Chinner is hoping to land a big new feature.

Linus Torvalds hasn't said whether he intends to honor this secondary pull request for XFS in Linux 4.8, otherwise this last-minute feature will be held off until Linux 4.9. This feature is reverse-mapping support for the XFS file-system.

Chinner does a good job of thoroughly describing what this feature is all about and why it's so important to the future of the XFS file-system:
Reverse mapping allows us to track the owner of a specific block on disk precisely. It is implemented as a set of btrees (one per allocation group) that track the owners of allocated extents. Effectively it is a "used space tree" that is updated when we allocate or free extents. i.e. it is coherent with the free space btrees we already maintain and never overlaps with them.

This reverse mapping infrastructure is the building block of several upcoming features - reflink, copy-on-write data, dedupe, online metadata and data scrubbing, highly accurate bad sector/data loss reporting to users, and significantly improved reconstruction of damaged and corrupted filesystems. There's a lot of new stuff coming along in the next couple of cycles, and it all builds in the rmap infrastructure.

As such, it's a huge chunk of new code with new on-disk format features and internal infrastructure. It warns at mount time as an experimental feature and that it may eat data (as we do with all new on-disk features until they stabilise). We have not released userspace suport for it yet - userspace support currently requires download from Darrick's xfsprogs repo and build from source, so the access to this feature is really developer/tester only at this point. Initial userspace support will be released at the same time kernel with this code in it is released.
Exciting to hear that they are working on copy-on-write data, data deduplication, online metadata and data scrubbing, and other features for the next few Linux kernel cycles built off this new foundation. More details via this pull request.

Update: The pull request has been honored for Linux 4.8.
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