[OpenAFS-devel] RE: afs and byte-range locking ideas

Cameron, Frank Cameron@ctc.com
Thu, 13 Dec 2001 21:03:48 -0500


>Stage 1: Upgradable byte range locks at the client side
>(Client change only, assumes existing servers only)
>
>When a process on client requests a byte range lock, first attempt to
>get a full file lock on the server (if one has not already been obtained
>by this local client). If successful, locally attempt to grant the byte
>range lock.
>
>Gain: This allows multiple processes on a single host to use byte range
>locks locally, which will help multi-process apps work properly when
>components of the same app need to lock for synchronization within
>itself. 

I've been looking at src/afs/VNOPS/afs_vnop_flock.c for a while.  Am I
correct in thinking that this is the only section of code that implements
the present byte-range handling scheme?  Is this the same code executed by
the Windows clients?

openafs-1.2.2:
552          /* next line makes byte range locks always succeed,
553             even when they should block */
554          if (af->l_whence != 0 || af->l_start != 0 || af->l_len != 0) {
555              DoLockWarning();
556              return 0;
557          }

-frank