]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - scrub/repair.c
xfs_scrub: in phase 3, use the opened file descriptor for repair calls
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 May 2022 02:48:13 +0000 (22:48 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 18 May 2022 02:48:13 +0000 (22:48 -0400)
commitbb9be147e8a718b06e4bf0de064432949a89d940
tree2bd6f69970d71281d777073f67705c8b54a83a7e
parent26289d58bbe7b373291f222c71907e845e2a18ee
xfs_scrub: in phase 3, use the opened file descriptor for repair calls

While profiling the performance of xfs_scrub, I noticed that phase3 only
employs the scrub-by-handle interface for repairs.  The kernel has had
the ability to skip the untrusted iget lookup if the fd matches the
handle data since the beginning, and using it reduces the repair runtime
by 5% on the author's system.  Normally, we shouldn't be running that
many repairs or optimizations, but we did this for scrub, so we should
do the same for repair.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/phase3.c
scrub/phase4.c
scrub/phase7.c
scrub/repair.c
scrub/scrub.c
scrub/scrub.h