Whamcloud - gitweb
LU-11085 ldlm: optimise extent locks with identical extent
Many locks with identical extent is (apparently) common. Rather than
putting all of these locks in the extent tree, possibly making it much
bigger than needed, link them all together with only one in the extent
tree.
When removing the one in the extent tree, if there are others, one
of those must be placed in the tree where the original was.
extent_replace() does this. It could be in generic code.
A new extent_insert_unique() is added. Ideally this would be provided
by the standard interval_tree code.
As extent_insert() is now not used, INTERVAL_TREE_DEFINE is told to
make all functions 'static inline' so we don't get warnings about the
unused function.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I9f8433514f8451abc80bbb6050499599e0f93520
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54587
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>