[AFS3-std] Re: byte-range file locking draft

Matt W. Benjamin matt@linuxbox.com
Thu, 6 May 2010 15:06:54 -0400 (EDT)


Hi,

----- "Andrew Deason" <adeason@sinenomine.net> wrote:

> On Thu, 6 May 2010 13:46:05 -0400 (EDT)
> "Matt W. Benjamin" <matt@linuxbox.com> wrote:
> 
> > http://www.ietf.org/id/draft-mbenjamin-afs-file-locking-01.txt
> 
> >> 2.3.1
> >> [...]
> >> A file server may revoke locks granted to any client, for any 
> >> reason.
> 
> Hmm, what does a client do if a lock is revoked after an application
> acquired a lock and is doing I/O? Not that I'm suggesting a change in
> the draft, but I'm just wondering... The results don't seem happy.

The intention is to indicate that a lock is really a lease from the server, not to encourage the server to be capricious in recalling locks.  Perhaps there's some grace concept missing when certain types of locks are outstanding, however?  The delegation concept did provide for this.

> 
> >> 2.4.3 Lock Flags for Share Reservation
> >> 
> >> The following flag constants are defined for use in the Flags 
> >> member of the AFSByteRangeLock structure and equivalently in the 
> >> Flags argument of the SetByteRangeLock procedure, and 
> >> specifcally, identify share reservations:
> 
> specifically
> 
> >>   Expiration
> >>
> >> AFSByteRangeLock instances may be regarded as a special-purpose 
> >> callback. Instances persist until canceled, or until Expiration 
> >> is reached.
> 
> Sorry to bring this up (again), but this doesn't define the units for
> 'Expiration'.

No problem.  Units of expiration are transitional in this draft.  When RPC refresh is published, the intention is to track its usage.

> 
> >> 2.6.3 UpgradeByteRangeLock
> 
> If two clients try to upgrade their locks simultaneously and they
> specify AFSLock_Flag_Wait, does one of them return EDEADLK?
> 
> Also, what interfaces have atomic lock upgrades? I thought POSIX ones
> didn't, but perhaps I'm remembering incorrectly... or are there
> Windows
> ones that have this?

I think a subset of POSIX interfaces does assume it, see OpenGroup 2004's description fcntl.  The situation with Windows is I think more complicated, there may need to be a note on it.  

> 
> -- 
> Andrew Deason
> adeason@sinenomine.net
> 

-- 

Matt Benjamin

The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309