summaryrefslogtreecommitdiff
tag namerepair-dirs_2021-10-22 (e8ed9bdedd049f31a09fed31b3142c7ae04288ca)
tag date2021-10-22 16:45:25 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 83afbcfdb3...
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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmFzTRUACgkQ+H93GTRK tOsDjRAAlFiHaF/MdRNo4a3xMvkOe9M/iAg33jmOKmMBvFp3Uku8p648HZCsvRbb IRjEIpT21BPnPqU7aRK/1+8XMzDc8Z9JEY8luk7DM/A35qyfNquwd7CqwR5CI0HY YzoJfJW8BiiukQ8zU6hnBe+//GETB6QGcYH6F+wm2w+rv3MXKlh+QrgrHKMUP+ai WB1/QTNZYZ3nbDb8BD1IwMF4zEpCLgDgEzhas0Xqfj1nYmQzJi2Ab4PCbFNFO1tt z75K7Uiv4olD/H4JYUApZBImAbE/Cw23fz1DYyqEnLdIHlesYMvuGEE2WK0nmOw1 T83QXb502SFZVOZqKsM5BF2qb26e8xGLrI2lZkglgmlrKeFjDKvNsJJFD5ZMeQWy mDHmEyAdVchJv6b9pnP0hOF85rSVX6AeBDdYmHahKOPDas05F4rsAta+MlrPs9qj f15zHiXJxGDVNEJAJJBF7BTLPJuTxgBAssI2AwM80+l+g/x0iSpHKSCQE6hiDi5w znKvZN15cv2W5iU5p8lJOrSC2R9kpZfJbkzeUB4pa7AdCY1zIMKd0ssvOhdrXnx/ xJZH4trV4h++EcrKst9ot1ohQQLiMsb1lXuHPBMlahE5RiiFB54OuCiWa9dlbfTK XCs+EGSAkvSe2yyepXvW1RtNa436ZRCSEEail/TuONG8zZmCUk8= =c8Cu -----END PGP SIGNATURE-----