fnctl (https://man7.org/linux/man-pages/man2/fcntl.2.html) supports locking a portion of a file (specified by start position and length).
Behind the scenes, what does the algorithm look like?
I'm primarily looking for information about which lock type(s) it uses, how it uses ranges (does it use a prefix tree?), etc.