Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Jul 1997 15:34:34 -0700
From:      Julian Elischer <julian@whistle.com>
To:        Terry Lambert <terry@lambert.org>
Cc:        Sebastian Lederer <lederer@bonn-online.com>, freebsd-hackers@FreeBSD.ORG
Subject:   POSIX locking ( was NFS locking)
Message-ID:  <33B985FA.3F54BC7E@whistle.com>
References:  <199707012024.NAA27875@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> 
> > Let me see if I understand all issues correctly:
> >
> > > 1)      The POSIX semantics make it difficult for rpc.lockd
> > >         to have only one file handle per file regardless of
> > >         the number of clients with the file open.  This is
> > >[...]
> >
> > So the rpc.lockd (on the server) would have to keep a list of all active
> > locks on a file and only close the file when all locks are cleared.
> 
> No.  The rpc.lockd could not convert a handle into an fd, and
> subsequently close the fd, until all fd's for that file had been
> closed by all clients.

basically the posix locking is a pain in the rear-end.
It's quite amazing that they managed to get something SO WRONG
without being stopped in the process by at least one person with
a clue.

SAMBA has to go to great lengths to get around this..
I suggest that we have a per-process flag that allows the locks to be 
done per-fd.
it would break posix, but if you had posix by default, and this 
only if you set it, then it would still be posix complient.

such things as samba and nfslockd could flip the bit and get
useful semantics.

Anyone think this is a TERRIBLE idea?
certainly Once the semantics and mechanism of 'turning the bit on'
were settled, the code changes would be quite easy.
I'm sure the same interface could be added to Linux if the samba
people asked for it (and I know they would).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33B985FA.3F54BC7E>