summaryrefslogtreecommitdiffstats
tag namerepair-dirs_2021-03-02 (d3a7c76b7445b9ff283c89bc632119df5b7ee1f3)
tag date2021-03-02 15:17:39 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit c6d6432e7f...
downloadxfs-linux-repair-dirs_2021-03-02.tar.gz
xfs: online repair of directories
This series employs atomic extent swapping to enable safe reconstruction of directory data. Directory repair consists of five main parts: First, we walk the existing directory to salvage as many entries as we can, by adding them as new directory entries to the repair temp dir. Second, we validate the parent pointer found in the directory. If one was not found, we scan the entire filesystem looking for a potential parent. Third, we prepare the temp file by changing the inode owner field in the directory block headers. Fourth, we use atomic extent swaps to exchange the entire data fork between the two directories. Finally, we add the ability to inactivate directories by directly freeing all the data fork blocks. This does not change anything with normal directories, since they must still unlink and shrink one entry at a time.