]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: in phase 3, use the opened file descriptor for scrub 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)
commita7ee7b6859d5f8cecb513157c3cf1d9e6e7d826d
tree443f8df754a1dc767d47a7b5fb42eeb85511d68b
parent3bc9ea15c3cc7b4237f87dfa73e59ad55aaedf48
xfs_scrub: in phase 3, use the opened file descriptor for scrub calls

While profiling the performance of xfs_scrub, I noticed that phase3 only
employs the scrub-by-handle interface.  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 phase 3 runtime by 5% on
the author's system.

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/scrub.c
scrub/scrub.h