[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NFS and file locking



On Fri, Aug 20, 1999 at 02:13:39AM -0400, William T Wilson wrote:
> On Thu, 19 Aug 1999, Stephen Pitts wrote:
> 
> > doesn't work. I think that it is trying to lock the files in some
> > non-NFS compatible way.
> 
> You have to run lockd if you want locking to work over NFS.  Even so,
> locking still doesn't work right (i.e. it still leaves open the
> possibility of race conditions) and it only works with flock(), as far as
> I know.  fcntl() won't work because fcntl() style locks are supposedly
> "mandatory" locks and the NFS protocol has no support for mandatory
> locking.

Thanks for the indepth info..thats just what I need. I'm now running
kernel-space NFS server with patches from the knfs package and
Wordperfect (evidently using flock()) works fine. An strace on kexpress,
however, reveals that gdbm uses fcntrl! Perhaps I'll look into it and
submit a patch at some point.

Since you seem to be in the know, does Coda offer any better locking
support?

> 
> > Are there any workarounds to these NFS locking problems?
> 
> Yeah, create the locks on a local filesystem :}
> 
Yup, I'll continue to symlink.

-- 
Stephen Pitts
smpitts@midsouth.rr.com
webmaster - http://www.mschess.org


Reply to: