[OpenAFS] who has that file open

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 05 Dec 2005 02:27:15 -0500


On Saturday, December 03, 2005 10:53:23 PM -0500 Jeffrey Altman 
<jaltman@secure-endpoints.com> wrote:

> tfitz wrote:
>> Does the server lock implementation really depend on
>> client-side benevolence?
>
> Yes it does.

But then, like UNIX file locks, locks on AFS are advisory, not mandatory. 
That means that holding a lock on a file doesn't prevent someone else from 
accessing the file; it only prevents them from getting a conflicting lock. 
Thus, applications using locks already depend on other applications with 
access to the same file not to just ignore the lock.

Don't give 'w' to people if you don't want them to write to your files.
Don't give 'k' to people if you don't want them to screw with your locks.

Yeah, this is somewhat incompatible with the new requirement that you give 
Windows users 'k' to files if you want them to be able to open them at all. 
IMHO, the requirement that you be permitted to lock a file in order to open 
it by clicking on it, even if the application does not require a lock, is a 
flaw in Windows.  Unfortunately, it is not one that can easily be worked 
around in OpenAFS.  At some point, this will surely cause some pain.

-- Jeff