xfs: support preallocating and copying content into temporary files
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:31 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:49 +0000 (14:58 -0700)
commite81ce4241318d5ec943b4fe205953498a66ca071
tree3fb8ac217742d884a794bb10edc093cc8583895e
parent5befb047b9f4de1747bf48c63cab997a97e0088b
xfs: support preallocating and copying content into temporary files

Create the routines we need to preallocate space in a temporary ondisk
file and then copy the contents of an xfile into the tempfile.  The
upcoming rtsummary repair feature will construct the contents of a
realtime summary file in memory, after which it will want to copy all
that into the ondisk temporary file before atomically committing the new
rtsummary contents.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/tempfile.c
fs/xfs/scrub/tempfile.h
fs/xfs/scrub/trace.h