summaryrefslogtreecommitdiffstats
tag namerepair-xattrs_2022-09-30 (b8dc6f67184cfe174f59e474dfdbf7fcabc62000)
tag date2022-09-30 20:10:10 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 124555e8b6...
downloadxfs-linux-repair-xattrs_2022-09-30.tar.gz
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+H93GTRKtOsFAmM3r5IACgkQ+H93GTRK tOu4kg//bVLltcPr0NjbGiDINQChhsZKES7GIiVHJcexgHmPskuqBlJ68ocuxKNh ttsAhwKa4aGIxeUkOkaG0Jiz6tISTbTf7ofiRgH1x1oe0Wa+yzey7lVd4tvtGLlL n2H7aNrj0pS3qMUJr/KvdzYadwaNCzmy3XbiVSVaGQzDadgdlaRObuOUkxjX70cA SMiy7x08g3e+6uWc7dvyLPsXjExRCXPBiVwSHb22UmRsyvbmgJzxLeh4IbaHLwnm iW98Ns8TsobtRgyE8kybH75PI/B2aIzcmQcTgJ4GaqEy8xPYm6aNyYrSf3dGZ1Jm ISb7bQOI1QTHzb1d+EOQsGbOE4kzd70wSkuDB0byDb/kRJnArCbSHkXdta/BQ4JX d8z1U58MZc/5x7A7okRNs7GOFU4OeucOqGfBrFFYgkckyL5nu3Udi1mnsAyh18sm UUFbqxTDkiXREvZ/SgGChy0TpNxkonV72dj4lhQ6QP29KeWJgR55EhHiK/j2Wed0 QaeptwJYDIkx0UW2a6+9fWamyKeJGZ0RAOoRfAOUycZ4/cQ0BgB+oqgLD9UZ4fbW fQ6hYFv30J4w/e6sw4NZBK1ofVudaojdZs08OPBs3SR3uciwMEahg0Valzk0Y1v6 rpmGZ0vl83rlTLXP/8OyKM/tDDk05c8nwnjVuiFlDuVbCup9H7M= =hdnG -----END PGP SIGNATURE-----