summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_btree_staging.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-04-25 18:37:06 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-04-27 10:47:19 -0700
commit75d893d19c8e1b4bf4a9acd613fe5e7a80b58974 (patch)
tree38de9024465fc6915315fbf152273bc4fef69392 /fs/xfs/libxfs/xfs_btree_staging.c
parent5b7ca8b313621907d80460bfcc1fa876d2a38488 (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> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree_staging.c')
0 files changed, 0 insertions, 0 deletions