xfs: split xfs_zone_record_blocks
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Jul 2025 05:35:44 +0000 (07:35 +0200)
committerCarlos Maiolino <cem@kernel.org>
Mon, 11 Aug 2025 12:04:20 +0000 (14:04 +0200)
commitf76823e3b284aae30797fded988a807eab2da246
tree6190d6bfe81bc3f225ad2fa937d6a9a9d8bda29d
parent5d94b19f066480addfcdcb5efde66152ad5a7c0e
xfs: split xfs_zone_record_blocks

xfs_zone_record_blocks not only records successfully written blocks that
now back file data, but is also used for blocks speculatively written by
garbage collection that were never linked to an inode and instantly
become invalid.

Split the latter functionality out to be easier to understand.  This also
make it clear that we don't need to attach the rmap inode to a
transaction for the skipped blocks case as we never dirty any peristent
data structure.

Also make the argument order to xfs_zone_record_blocks a bit more
natural.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_trace.h
fs/xfs/xfs_zone_alloc.c