tag name | repair-xattrs_2022-11-09 (aea39a12bfcfc22f49b276f42df9d941810103e0) |
tag date | 2022-11-09 19:10:19 -0800 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit aa6c7e472c... |
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+H93GTRKtOsFAmNsa5sACgkQ+H93GTRK
tOsK4RAAq3ko0leyMSonIbpL1vo0G7Nb2gIRUyfhHV9+73cD+vXCHAZA04U66u1Q
faRdybMk6ZpzZ0Yjxr1zIVbijrtMlG3NUjfmXahv1wylCXl8vQ9P3pWL4QjtMk7e
2+AIYWu+0vesPDp037T3zaA7jv03dOEfrn04CjdsghTQfQQ/EuBA7jfJOp7/5ePe
6pSKtquC3IfjpQkNkGyXLwMtDq3MxVx8f2hA+SczHgCPyPVGifUJJzx84/7LMz/p
LCvGF0xY2S6L1IwYoiEDXjRmh7vg/5z6HcVoX2kxXGq52BfYtVPinUvh6+SE75yr
axqiX26lrWK/1FN4rsoUWW7BwOCIOvAog6XkuxCmD32oGwkWvG+gHONo8azNGzj/
rYzkw+CmS6WdYNTNeFZS0Ko8ydbi+8aFgTHreqKJ4x6XBag4YngJE7XVCqRb3U1t
nZEx60ogV26x+NIBRcn/iMtz3MCauTTSArnzhtPotowpvkElnvMN0TxPjrD/PLUt
sKdi/gZpjM+vikoBZ4k+ztuqPREJv5qXVOdLipJYF35gknda6sjhBzMq6H0Nf71i
dqzKtOkvmuWGS6sTZIfsJ5sCmbZtKBPLqDvV19W6gqH0ikBksJknJtvrtkvAYS8n
RUtxWwMCbmTFh6FI1J7P/sZfVSXxp/bRuCowXcN0L1xEo/tUGA4=
=cd3a
-----END PGP SIGNATURE-----