xfs: online repair of symbolic links
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:59 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:58 +0000 (14:58 -0700)
commit2651923d8d8db00a57665822f017fa7c76758044
tree7c799ceb8ce9c3ca0c2f1b6cd436ab0e464c4402
parentea8214c3195c2ed3a205dea42bbe7746712fc461
xfs: online repair of symbolic links

If a symbolic link target looks bad, try to sift through the rubble to
find as much of the target buffer that we can, and stage a new target
(short or remote format as needed) in a temporary file and use the
atomic extent swapping mechanism to commit the results.  In the worst
case, we replace the target with an overly long filename that cannot
possibly resolve.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/Makefile
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/symlink.c
fs/xfs/scrub/symlink_repair.c [new file with mode: 0644]
fs/xfs/scrub/tempfile.c
fs/xfs/scrub/trace.h