[OpenAFS] Using callbacks for file locking?

Nathan Neulinger nneul@umr.edu
Sun, 13 Mar 2005 14:48:02 -0600


Please read over the list archives and the wiki. I proposed a mechanism
that would work for single-client byte-range locks without any protocol
changes ages ago, but have never implemented it. It basically requires
that the cache manager keep track locally of any byte range locks that
are issued, and upgrade those to a full-file lock on the server. Thus,
on a single client, you can have a mix of locks, including on partial 
byte ranges, but on a separate client, you will be restricted to 
compatible whole-file locks.

fcntl locks for the whole file are fully supported though. 

-- Nathan

On Thu, 2005-03-10 at 20:15 -0600, Mike Fedyk wrote:
> Hi,
> 
> Here is my current (probably flawed) understanding of callbacks.
> 
> When the cache manager (CM) connects to a RW volume, it sets a
> callback
> for that file to be notified to invalidate its local copy if another
> CM
> writes to the file.  Kinda like Oplocks in the SMB/CIFS world.
> 
> So, why couldn't callbacks also propagate and invalidate flock/fcntl
> locks?
> 
> Yes, I know AFS doesn't support byte range locking, and the
> architecture
> doesn't support database files.  What I'm looking for is being able to
> know when another user has a file opened/locked on a different
> machine,
> so that OpenOffice/etc. will open the file RO.
> 
> Is this possible with AFS on two different client machines?
> 
> Thanks,
> 
> Mike
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
> 
> 
>