On Thu, 2005-09-01 at 14:00 +0100, Jamie McCracken wrote:
> Alexander Larsson wrote:
> > On Thu, 2005-09-01 at 13:47 +0100, Jamie McCracken wrote:
> >
> >>Alexander Larsson wrote:
> >
> >
> >>>Requiring such a setup is pretty demanding, for the conceptually trivial
> >>>thing of having two personal desktop machines. We all know this won't
> >>>happen at most places.
> >>>
> >>
> >>Well the only other thing I can think of is to use external lock files
> >>which are opened with O_CREAT and O_EXCL to serialise access in a
> >>multisession environment. Will that be atomic on NFS?
> >
> >
> > Locking over NFS is handled by a separate protocol and daemon (lockd).
> > We tried to use that in gconf, but apparently NFS locking is just
> > totally broken on too many systems for it to work.
>
> yes though how does gconf solve this (or is it single session only)?
It uses local locking and i think atomic file replacement, meaning it
gets a "last machine to change setting wins" semantics on a per-gconf
file (i.e. gconf folder) basis. But don't quote me on that.
> I also read the following as a work around on NFS:
>
> "O_EXCL is broken on NFS file systems, programs which rely on it for
> performing locking tasks will contain a race condition. The solution for
> performing atomic file locking using a lockfile is to create a unique
> file on the same fs (e.g., incorporating hostname and pid), use link(2)
> to make a link to the lockfile. If link() returns 0, the lock is
> successful. Otherwise, use stat(2) on the unique file to check if its
> link count has increased to 2, in which case the lock is also successful."
I'm not an expert on NFS locking, I just know we totally failed to make
it work robustly for gconf. Part of it was not the specs per-se, but
rather problems with actual NFS implementations.
Anyway, I'm not really interested in using sql (embedded or not) for
core desktop stuff. I think its overcomplicated and likely to cause
problems.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
[EMAIL PROTECTED] [EMAIL PROTECTED]
He's a one-legged alcoholic inventor with a robot buddy named Sparky. She's a
foxy tempestuous museum curator with an incredible destiny. They fight crime!
--
nautilus-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/nautilus-list