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

Derrick Brashear shadow@gmail.com
Wed, 21 Apr 2010 09:48:27 -0400

On Wed, Apr 21, 2010 at 9:26 AM, Hans-Werner Paulsen
<hans@mpa-garching.mpg.de> wrote:
> On Wed, Apr 21, 2010 at 08:46:54AM -0400, Derrick Brashear wrote:
>> if you have a valid callback, the file better be up to date. uh....
> Hm, I do not understand. I have the following code on one client:
> (1) fd = open("afs-file",O_RDWR)
> (2) flock(fd,LOCK_EX)
> ...
> When the file is modified on the fileserver after (1) and before (2)
> the copy on the client is NOT up to date (the file is opened O_RDWR).

if you opened it O_RDWR on this client, it better have a valid callback.

if it's modified and you still have it open, the callback is broken.
if the client doesn't refetch, it's a bug, and it has nothing to do
with locking particularly.