Whamcloud - gitweb
LU-17276 ldlm: use interval tree for searching in flock 51/53951/14
authorMr NeilBrown <neilb@suse.de>
Fri, 26 Apr 2024 14:40:20 +0000 (10:40 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jun 2024 00:48:20 +0000 (00:48 +0000)
commitea012dfb2a94060450c75c4f425f2d8b8c4329f5
tree8f891220788cd36a645848fe1f20e887238966bc
parent1c635e263f0aaf4827cf69cbd48b7290efc9e085
LU-17276 ldlm: use interval tree for searching in flock

This patch converts ldlm_process_flock_lock() to use the new interval
tree to find flock locks more efficiently.

Previously all locks the the same owner were adjacent in the
lr_granted list.  This was used for the second stage of merging
overlapping locks once it was confirmed that there were no conflicts.
Now instead we build up a temporary list of locks in the target range
that have the same owner, and use that for the second stage.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I0a4f1e833d8db36827c318a020de564a78b0adb5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53951
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_flock.c