Hi!
Since the ofd read lock blocks are starting at offset 0 and are write_size in size and the posix write locks are starting at offset write_size/4 and are as well write_size in size.
I tried to make sure that we do not have overlaping posix locks since in that case it's very easy to get a failure.
Ok, I see. In this case, we still see the posix locks being merged between the writers.Could it be that (either by design, or by accident) the F_UNLCK operation on one of them now releases the combined lock area?
That shouldn't be happening either. The threads that place the POSIX locks does not overlap and they should unlock exactly the same block that has been locked. So even if neighbouring locks are merged when locked the unlock operation should split them back again.