[OpenAFS-devel] Why only Linux? (was: linux-and-locks-cleanup-20070202 crashes linux kernels older than 2.6.17 (see RT #53457))

Chaskiel Grundman cg2v@andrew.cmu.edu
Sun, 25 Feb 2007 23:56:16 -0500 (EST)


> Being a mostly Linux admin I'm not complaining, but I am curious as to why 
> intra-client byte-range locking is only being focused on with Linux and not 
> *BSD, Solaris, etc.

It became essentially free once we chose to call posix_lock_file to get 
unlock notifications on close. We don't actually do the work of deciding 
if two byte range locks conflict. It's not possible to get that on darwin, 
and I'm not sure about solaris (It appears that we could invoke lf_advlock 
to do this on non-darwin bsds. fs_frlock might work for this on solaris, 
but it's interface is a bit more complicated and I don't claim to 
understand it.)

Researching this question has led me to realize that there is still an 
issue on linux. That is, F_GETLK will not properly detect a byte range 
lock that the corresponding F_SETLK will conflict with.