]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_mdrestore: refactor open-coded fd/is_file into a structure
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Dec 2024 22:00:47 +0000 (14:00 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:34 +0000 (18:01 -0800)
commitc1464833d94d9d4d279a7adab1d42477515aa24b
tree62b16fec44181964433f8f4b02682e6219194d1e
parent06f8edf3e634d2463c78c58f09521941578db55d
xfs_mdrestore: refactor open-coded fd/is_file into a structure

Create an explicit object to track the fd and flags associated with a
device onto which we are restoring metadata, and use it to reduce the
amount of open-coded arguments to ->restore.  This avoids some grossness
in the next patch.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
mdrestore/xfs_mdrestore.c