summaryrefslogtreecommitdiff
tag namerepair-xattrs_2022-10-14 (a4d09653a36fff1e58a08fcc8d276467b21c242b)
tag date2022-10-14 14:19:00 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 6b55d25d9d...
xfs: online repair of extended attributes
This series employs atomic extent swapping to enable safe reconstruction of extended attribute data attached to a file. Because xattrs do not have any redundant information to draw off of, we can at best salvage as much data as we can and build a new structure. Rebuilding an extended attribute structure consists of these three steps: First, we walk the existing attributes to salvage as many of them as we can, by adding them as new attributes attached to the repair tempfile. We need to add a new xfile-based data structure to hold blobs of arbitrary length to stage the xattr names and values. Second, we write the salvaged attributes to a temporary file, and use atomic extent swaps to exchange the entire attribute fork between the two files. Finally, we reap the old xattr blocks (which are now in the temporary file) as carefully as we can. Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNJ0kQACgkQ+H93GTRK tOsYxg/9G3F77saIhKrxhu/47hD0/9C2mLxKZxiPSnjHRNNqHK2UrLlx7QYG8hwo xGowEKMHsbuuVNrFVVKZ8ntoiUZj2Rug4b4RAHDymjjUs05ydx+OjnhcC5SMLqBc RXZJcVpkstJTc42Vn6M0mJhzTW4tyZqhKxiLnknZt1h7ap4ffU6TE6DpYz5hcBrG r17N4gEhsX/EbZnQ1SUhGHJXnRHpmDclNy7AejfahJor4T8pY4CsptoxPFi9hoZ2 OjEsaZTRi7oQhZNWInON2S5k6/OEDbsqjsc6EiUw8bs24CiNhPANSnlofhLDyLcR JqCeIWs8KtUyr1Cxt0TadCMac41Jw/9OUtwnpUoGRy6X1NXk5PuixzwOU7vEc1H1 7JQtCY9VgPHQEUuISBx5crzQXs6KCPE/hC1693Ar2jLGCBrV49w5h0niCM1Qm1AR aEz0fIQu2GldQzn3G6tTvC/ErJLg0saumh0fG5gl79zazVOzvMYkr66aH7SxvEUh bXjdKMHjZiZPaMzaRktIwbL12Qbf4P12x5E3HTVsQeTNGQnO8D5JpsoVz9gOM8MJ gAZHs87Tnej7CVeIVmquRDFOKSNgayK73k79iyyF1Pd1jqBnzzzI3t2c/iDIv8Z7 b66MiO/KZWMkTzz97fflUcry8701GJcfS4q3CCxN49pfenCRWFU= =NN8Z -----END PGP SIGNATURE-----