Linux 5.11 XFS Will Flag File-Systems In Need Of Repair

Written by Michael Larabel in Linux Storage on 20 December 2020 at 09:40 AM EST. 23 Comments
LINUX STORAGE
The main feature change for the XFS driver code in Linux 5.11 is adding a new "needs repair" feature flag. When the XFS code marks a file-system as needing repair, it will refuse to mount until the xfs_repair operation is run on it.

The XFS kernel code with Linux 5.11 and later will set the "needs repair" flag on a file-system when it's in a known state needing repair via the xfs_repair user-space utility. The updated xfs_repair utility will in turn clear that feature flag once the operation is complete. When needing a repair, xfs_admin should automatically run the repair operation so ideally the user/administrator will not need to issue the user-space command themselves.

While this flag can be used for various cases where the file-system may be known to be in a bad state, the motivation for "needs repair" is when it comes time to forcing users to upgrade the XFS file-system capabilities such as for upgrading it to handle XFS timestamps past the Year 2038.

With the prior Linux 5.10 kernel cycle they already announced XFS Version 4 file-system format will be deprecated in a decade and users when possible should begin upgrading to the Version 5 format. With the new feature flag, they will ultimately be able to force users to upgrade the file-system format by setting the "needs repair" flag when it comes time to forcing users to upgrade and removing the kernel support for the prior format.


The new feature flag was merged for Linux 5.11 along with other code clean-ups and fixes.
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