xfs: document metadata file repair
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 01:59:50 +0000 (18:59 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 01:59:50 +0000 (18:59 -0700)
commit2f754f7fb9fdd4e051cb273010c4244f95095835
treeeab8380c194dc107dfe01f6e1f6a1aa365d212e7
parenta0d856eede5a3ccfc7f0a4e02ee2e91ffab7f784
xfs: document metadata file repair

File-based metadata (such as xattrs and directories) can be extremely
large.  To reduce the memory requirements and maximize code reuse, it is
very convenient to create a temporary file, use the regular dir/attr
code to store salvaged information, and then atomically swap the extents
between the file being repaired and the temporary file.  Record the high
level concepts behind how temporary files and atomic content swapping
should work, and then present some case studies of what the actual
repair functions do.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Documentation/filesystems/xfs-online-fsck-design.rst