[Lustre-discuss] lustre official flock support

Oleg Drokin Oleg.Drokin at Sun.COM
Wed Mar 5 09:39:12 PST 2008


Hello!

On Mar 5, 2008, at 11:33 AM, Joe Barjo wrote:
> While making my tests, I saw that the flock system call was not  
> working.
> Googling aroung I found the flock option in the mount command, and it
> seems to work just fine.
> However, I've read in the documentation that flock will only be
> supported in 1.8 version of lustre.
> What is the current status of this?
> Is flock usable in production for 1.6.4.2?

flock has a major flaw in a sense that it is not fd-attached, so
once you open a file, get flock lock, fork and try to release the lock  
from
child, the lock won't actually go away.
posix locking (through fcntl) on the other hand should work just fine.
Note that right now there are some assertions in the code that would  
kill the client
if you issue locking call with unknown parameters (like command), I  
think samba does that.
That code needs to be changed to just return error (in ll_file_flock,  
2 occurrences),
there is a separate patch somewhere in bugzilla, but I cannot find it  
immediately
and it would be included with some changes I am preparing anyway.

Bye,
     Oleg



More information about the lustre-discuss mailing list