This is what I needed. 

Thanks,
Jason

---------------------------------------------------------------------------
Jason Edgecombe | Linux and Solaris Administrator
UNC Charlotte | The William States Lee College of Engineering
9201 University City Blvd. | Charlotte, NC 28223-0001
[email protected] | http://coe.uncc.edu |  Facebook
---------------------------------------------------------------------------
If you are not the intended recipient of this transmission or a person 
responsible for delivering it to the intended recipient, any disclosure, 
copying, distribution, or other use of any of the information in this 
transmission is strictly prohibited. If you have received this transmission in 
error, please notify me immediately by reply e-mail or by telephone at 
704-687-3514.  Thank you.


-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Jeffrey Altman
Sent: Tuesday, March 15, 2011 12:46 PM
To: [email protected]
Subject: Re: [OpenAFS] Using a file lock to avoid race conditions?

On 3/15/2011 12:14 PM, Edgecombe, Jason wrote:

> I’m thinking of using a file lock (i.e. flock) in AFS to determine who
> fetches the email, but I need to know about the failure scenarios. Does
> the lock persist if the machine freezes or dies? Will an orphaned lock
> expire, and if so, how long does it take to expire?

Locks in AFS are issued with a five minute lifetime and must be renewed
by a client.

Write-locks are exclusive to a single client.  If the client dies or
otherwise becomes disconnected from the file server that issued the
lock, the lock will expire 5 minutes after it was issued.

Read-locks are shared and can be issued to multiple clients.  A
read-lock is renewed whenever any client requests a renewal.  If a
client fails or becomes disconnected from the file server, its lock
count will persist until five minutes after the last renewal request is
issued.

Obviously, the existence of an outstanding read-lock prevents the
granting of a write-lock.

Jeffrey Altman

Reply via email to