From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-workers@sunsite.dk
Subject: Re: [PATCH] history locking with fcntl
Date: Fri, 18 Apr 2008 02:49:42 +0200 [thread overview]
Message-ID: <20080418004942.GA1067@prunille.vinc17.org> (raw)
In-Reply-To: <080417065834.ZM9193@torch.brasslantern.com>
On 2008-04-17 06:58:34 -0700, Bart Schaefer wrote:
> On Apr 17, 10:40am, Peter Stephenson wrote:
> } pindex(HIST_FCNTL_LOCK)
> } provide better performance, in particular avoiding history corruption when
> } files are stored on NFS.
>
> Really? Traditionally fcntl() has been a lousy way to lock over NFS.
AFAIK, it's the only way to prevent some corruption due to file caching.
> Procmail, for example, has acres of code to handle using secondary
> files as semaphores precisely because nothing else was reliable over
> NFS
But procmail *also* uses fcntl. My patch still uses the old lock
mechanism, it just adds fcntl locking. That said, I often use fcntl
only, without any problem.
> (more specifically, only creat() was guaranteed to be atomic and
> lock daemons were flaky).
Some software, like Firefox, uses symlink() locking. So, if symlink()
isn't atomic, there will be problems with such software.
> I guess my point is that while fcntl() may be good on recent OSs (or
> recent versions of NFS, more likely) it's dangerous in an environment
> where you don't know what the NFS server is using (no matter how recent
> the local NFS client is).
I don't see why it can be dangerous if it is used in addition to
another lock mechanism, like it currently is.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
next prev parent reply other threads:[~2008-04-18 0:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 15:31 Vincent Lefevre
2008-04-17 9:40 ` Peter Stephenson
2008-04-17 13:58 ` Bart Schaefer
2008-04-18 0:49 ` Vincent Lefevre [this message]
2008-04-18 1:24 ` Bart Schaefer
2008-04-17 16:23 ` Wayne Davison
2008-04-17 16:35 ` Peter Stephenson
2008-04-18 0:59 ` Vincent Lefevre
2008-04-19 2:31 ` Wayne Davison
2008-04-19 5:23 ` Bart Schaefer
2008-04-19 18:35 ` Wayne Davison
2008-04-21 13:19 ` Vincent Lefevre
2008-05-05 1:25 ` Wayne Davison
2009-01-01 4:01 ` Vincent Lefevre
2009-01-01 4:12 ` Vincent Lefevre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080418004942.GA1067@prunille.vinc17.org \
--to=vincent@vinc17.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).