Whamcloud - gitweb
LU-11085 ldlm: convert ldlm extent locks to linux extent-tree
As Linux has a fully customizable extent tree implementation, use that
instead of the one in lustre. This removes the need to store the
extent endpoints in the lock twice, thus recovering some of the space
wasted in a previous patch.
It also allows iteration loops to be in-line rather than requiring a
callback - though in some cases we keep the callback.
Note that interval_expand() will not expand the lower boundary down if
the tree is not empty. We now make that explicit in the loop in
ldlm_extent_internal_policy_granted(). Consequently testing of
'conflicting > 4' is irrelevant.
Linux extent-trees does not have a direct equivalent to
interval_is_overlapped(), however we can use extent_iter_first() to
achieve the same effect.
We ask for the first interval in the tree that covers the range of the
given interval with extent_iter_first(). If nothing is returned, then
nothing in the tree overlaps the interval and interval_is_overlapped()
would return false.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Ie28c6fb0d40d2c92c7067c7a79f48ee1fc633ce9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/41792
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>