forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lustre: ldlm: Use interval tree to update kms
Currently, ldlm_extent_shift_kms does a linear search of the list of granted locks on the resource when looking for the lock to use to update the kms. This can be avoided by using the interval trees which store the extents of granted locks. We change the interval tree to store locks in reverse order, with lowest end first, and highest end last. Then we can easily find the last lock-end that doesn't ignore kms, and use that to choose a new kms. NeilBrown: modified from original to work with linux interval-tree WC-bug-id: https://jira.whamcloud.com/browse/LU-8272 Lustre-commit: e7cf1b060ba3 ("LU-8272 ldlm: Use interval tree to update kms") Signed-off-by: Patrick Farrell <paf@cray.com> Reviewed-on: https://review.whamcloud.com/20779 Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: NeilBrown <neilb@suse.com>
- Loading branch information
Showing
1 changed file
with
51 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters