summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_sysfs.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 10:40:12 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-09-17 18:54:48 -0700
commit19f9713967f278c95fa7532445e59e0c242bc4a3 (patch)
tree442c207c0721bdd799b5fad50fb12a1a25893d85 /fs/xfs/xfs_sysfs.h
parent1e8d5443c569887b6d90df70f25a8d8a27deb9eb (diff)
xfs: speed up rmap lookups by using non-overlapped lookups when possible
Reverse mapping on a reflink-capable filesystem has some pretty high overhead when performing file operations. This is because the rmap records for logically and physically adjacent extents might not be adjacent in the rmap index due to data block sharing. As a result, we use expensive overlapped-interval btree search, which walks every record that overlaps with the supplied key in the hopes of finding the record. However, profiling data shows that when the index contains a record that is an exact match for a query key, the non-overlapped btree search function can find the record much faster than the overlapped version. Try the non-overlapped lookup first, which will make scrub run much faster. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_sysfs.h')
0 files changed, 0 insertions, 0 deletions