[OpenAFS] sqlite on AFS will not work, even with whole-file locking

Derrick Brashear shadow@gmail.com
Wed, 21 Apr 2010 08:46:54 -0400


On Wed, Apr 21, 2010 at 8:11 AM, Hans-Werner Paulsen
<hans@mpa-garching.mpg.de> wrote:
> On Wed, Apr 21, 2010 at 12:49:39PM +0100, Simon Wilkinson wrote:
>> >When there are two processes (on different machines) executing that
>> >code, the (2) flock call has to update the local copy of the afs-file,
>> >otherwise locking is useless. And the (3) flock call has to sync the
>> >local copy with the fileserver.
>> >Writing a small test program I see that this synchronization isn't
>> >done.
>> >How can I use the flock(2) call on AFS files?
>>
>> Are you saying that the locks don't make it to the fileserver (so two
>> processes on different machines can flock() the same file). Or that
>> the file isn't flushed to the server when it is unlocked, so the
>> second machine doesn't see the changes that the first machine has made?
>>
> The second one. To be honest, today I checked only, that the local copy
> (the cache) is not updated from the fileserver on "flock(fd,LOCK_EX)".

if you have a valid callback, the file better be up to date. uh....


-- 
Derrick