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

Hans-Werner Paulsen hans@MPA-Garching.MPG.DE
Wed, 21 Apr 2010 14:11:51 +0200


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 =20
> >done.
> >How can I use the flock(2) call on AFS files?
>=20
> Are you saying that the locks don't make it to the fileserver (so two =20
> processes on different machines can flock() the same file). Or that =20
> the file isn't flushed to the server when it is unlocked, so the =20
> second machine doesn't see the changes that the first machine has made?
>=20
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)".

HW

--=20
Hans-Werner Paulsen		hans@MPA-Garching.MPG.DE
MPI f=FCr Astrophysik		Tel 089-30000-2602
Karl-Schwarzschild-Str. 1	Fax 089-30000-2235=09
D-85741 Garching