[AFS3-std] Re: Proposal: Extension of RXAFS_SetLock to support LockUpgrade and LockDowngrade

Jeffrey Hutzelman jhutz@cmu.edu
Tue, 28 Feb 2006 15:43:59 -0500



On Monday, February 27, 2006 11:37:42 AM +0000 David Howells 
<dhowells@redhat.com> wrote:

> Jeffrey Altman <jaltman@secure-endpoints.com> wrote:
>
>>   LockUpgrade - if there is only one lock issued and it is of
>>   type "Read", then change the lock type to "Write" and return
>>   success.  Otherwise, return EAGAIN.
>
> Should that be EDEADLK?

No; we don't do deadlock detection.
RXAFS_GetLock never blocks, because that would tie up a fileserver thread, 
potentially for a long time.  Instead, it returns EAGAIN, and the client is 
expected to retry periodically until it gets the lock it wants.

Of course, we really should only do this in the cases where the client 
should block, and not in the cases where there is an error.  I believe I 
covered that in a previous message.

-- Jeff