tag name | repair-dirs_2021-12-15 (ab71d8e93d341aba8ab7a8561ece6395a0f96deb) |
tag date | 2021-12-15 17:30:57 -0800 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit 44958c4f62... |
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+H93GTRKtOsFAmG6ltEACgkQ+H93GTRK
tOse8A/+KlrlxjGQh3BGYIWWtmABPptTIjChSz2fAfrRU8HUWgOx4KbOKaYMIJr+
d8MHvCRJYRp2dEfL8zZmRnFSMz4E0XGRx3XivtW011NDivfx7/bjHUi5J8A9JXKI
KEhUP6LhgA7hmIyMFFKKiRxTCDMSGf+Rsa32ZdufaXXf3bE0GllOeQpBD3FrbEr6
cPhtuj+Syw1Ir20lNKZgIwED3RBe24B9tol4Gnn0eOv1SOV49m+bpGQik6LTO8zW
6QKgkG2XckNdDRmHuF7NHyYS5ifQCGyIgSMll1BHFxk8LjUCz9d/yargAtpHL3kR
/53o+hQsobMs1Tcv5pN0A+cxRvURnlvPSAWylcmfDNip2Bgs6JngHd56J362C1Ab
F7SzMIsYUmTC1HFm2/fGN9hdFOhzNBZql+N8y13gFxuwEHZ9SEbX3gcY++pJiz8J
+Vft0A4WkjHKwFRxAfcAXj0bZtIwS1xn8hhherUDhHCPl+UiRe4p9zuHQ46CmoUQ
OqmF/tXzQelUZpk5Vo+2J8Z24d/6Ose6dNIiKkH1P46GiTmFBOzbjQ9rXLi130wk
ehKIXk08YBUkDQ087FeMgtQgwT+Wd9gXgmVa4OVJGYwPJZsPotuRi3/RBWeqoaoe
s2IFLRtXNQ94HYi7GC0vw140/d6TQWFnzTR2DrN0swFWU4fZBBs=
=3uAe
-----END PGP SIGNATURE-----